From 04b968da7069880fb4af5d254ac66bd914914ccd Mon Sep 17 00:00:00 2001 From: Cyd Date: Sun, 12 Jul 2026 15:32:44 -0500 Subject: [PATCH] Full-canvas 1080p viewscreen, compact MFDs in the corners Playtest direction on the canvas layout: all five MFDs at the compact 320x240 glass size - upper pair pushed to the top corners, score glass top-center, lower pair in the bottom corners, map bottom-center - and the viewscreen now fills the entire 1920x1080 canvas. Launched with -res 1920 1080 the 3D renders native 1:1 (the 2007 D3D9 path takes the 1080p backbuffer and 16:9 aspect without complaint). start-windowed.bat updated accordingly. Verified live: full-screen native 3D with the cockpit floating over its edges, mission running, preset lamp lit on the map column. Co-Authored-By: Claude Fable 5 --- BUILD.md | 15 +++++++-------- MUNGA_L4/L4VB16.cpp | 14 ++++++++------ pack-dist.ps1 | 3 ++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/BUILD.md b/BUILD.md index d5a1c06..5355c7f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -128,14 +128,13 @@ Two new environment options remove the hardware dependency entirely: ``` The cockpit is a fixed **1920×1080 internal canvas** (scaled down - uniformly on smaller work areas): the top row is three - native-resolution 640×480 glasses spanning exactly 1920, the 800×600 - viewscreen (launch with `-res 800 600`) sits centered, and the lower - MFDs (corners) + portrait map (bottom center) anchor to the bottom - edge. The panes deliberately **overlap the viewscreen and render over - it** — in the pod the MFD bezels partially occluded the viewport, and - the same trick lets a big 3D view and full-size gauges share the - canvas. MFDs render green-screen and the map full-color/rotated, + uniformly on smaller work areas): the viewscreen fills the whole + canvas (launch with `-res 1920 1080` for native 1:1 3D), with compact + 320×240 MFD glasses in the four corners, the score glass top-center, + and the portrait map bottom-center. The panes deliberately **overlap + the viewscreen and render over it** — in the pod the MFD bezels + partially occluded the viewport, and the same trick gives a + full-screen 3D view with the cockpit floating over its edges. MFDs render green-screen and the map full-color/rotated, CPU-side from the shared gauge canvas (the packed D3D windows stay hidden); the 3D scene presents into the viewscreen pane via `Present`'s `hDestWindowOverride` (`gMainPresentWindow`), clipped diff --git a/MUNGA_L4/L4VB16.cpp b/MUNGA_L4/L4VB16.cpp index 8ad85d8..677fa71 100644 --- a/MUNGA_L4/L4VB16.cpp +++ b/MUNGA_L4/L4VB16.cpp @@ -3908,17 +3908,18 @@ SVGA16::SVGA16( // the z-order, and clipped by those siblings so the 3D present // never draws over them. STATIC hit-tests transparent, so mouse // input over the 3D view reaches the game window as before. - // 800x600 (the -res native size), centered on the canvas. + // Fills the whole canvas - launch with -res 1920 1080 for + // native 1:1 pixels. //--------------------------------------------------------------- - int view_w = COCKPIT_CANVAS(800); - int view_h = COCKPIT_CANVAS(600); + int view_w = client_w; + int view_h = client_h; if (cockpit != NULL) { cockpitViewscreen = CreateWindowExA( 0, "STATIC", "", WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_BLACKRECT, - (client_w - view_w) / 2, (client_h - view_h) / 2, + 0, 0, view_w, view_h, cockpit, NULL, GetModuleHandleA(NULL), NULL); if (cockpitViewscreen != NULL) @@ -3934,8 +3935,9 @@ SVGA16::SVGA16( // 0x37.. / lower left 0x0F.. / lower right 0x07.. and the map // flanked by Secondary 0x10-0x15 / Screen 0x18-0x1D. //--------------------------------------------------------------- - int top_glass_w = COCKPIT_CANVAS(640); - int top_glass_h = COCKPIT_CANVAS(480); + // all five MFDs at the compact size, corners + top center + int top_glass_w = COCKPIT_CANVAS(320); + int top_glass_h = COCKPIT_CANVAS(240); int bot_glass_w = COCKPIT_CANVAS(320); int bot_glass_h = COCKPIT_CANVAS(240); int map_glass_w = COCKPIT_CANVAS(240); diff --git a/pack-dist.ps1 b/pack-dist.ps1 index cbac0fe..30321ca 100644 --- a/pack-dist.ps1 +++ b/pack-dist.ps1 @@ -81,8 +81,9 @@ TARGETFPS=60 Set-Content -Path "$dist\start-windowed.bat" -Encoding ascii -Value @" @echo off rem Red Planet 4.12 - desktop prototype (windowed, local test mission) +rem The cockpit canvas is 1920x1080; -res matches it for native 3D. cd /d "%~dp0" -start rpl4opt.exe -windowed -res 800 600 -egg TEST.EGG +start rpl4opt.exe -windowed -res 1920 1080 -egg TEST.EGG "@ Set-Content -Path "$dist\README.txt" -Encoding ascii -Value @"