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 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-12 15:32:44 -05:00
co-authored by Claude Fable 5
parent 1e15519e90
commit 04b968da70
3 changed files with 17 additions and 15 deletions
+7 -8
View File
@@ -128,14 +128,13 @@ Two new environment options remove the hardware dependency entirely:
``` ```
The cockpit is a fixed **1920×1080 internal canvas** (scaled down The cockpit is a fixed **1920×1080 internal canvas** (scaled down
uniformly on smaller work areas): the top row is three uniformly on smaller work areas): the viewscreen fills the whole
native-resolution 640×480 glasses spanning exactly 1920, the 800×600 canvas (launch with `-res 1920 1080` for native 1:1 3D), with compact
viewscreen (launch with `-res 800 600`) sits centered, and the lower 320×240 MFD glasses in the four corners, the score glass top-center,
MFDs (corners) + portrait map (bottom center) anchor to the bottom and the portrait map bottom-center. The panes deliberately **overlap
edge. The panes deliberately **overlap the viewscreen and render over the viewscreen and render over it** — in the pod the MFD bezels
it** — in the pod the MFD bezels partially occluded the viewport, and partially occluded the viewport, and the same trick gives a
the same trick lets a big 3D view and full-size gauges share the full-screen 3D view with the cockpit floating over its edges. MFDs render green-screen and the map full-color/rotated,
canvas. MFDs render green-screen and the map full-color/rotated,
CPU-side from the shared gauge canvas (the packed D3D windows stay CPU-side from the shared gauge canvas (the packed D3D windows stay
hidden); the 3D scene presents into the viewscreen pane via hidden); the 3D scene presents into the viewscreen pane via
`Present`'s `hDestWindowOverride` (`gMainPresentWindow`), clipped `Present`'s `hDestWindowOverride` (`gMainPresentWindow`), clipped
+8 -6
View File
@@ -3908,17 +3908,18 @@ SVGA16::SVGA16(
// the z-order, and clipped by those siblings so the 3D present // the z-order, and clipped by those siblings so the 3D present
// never draws over them. STATIC hit-tests transparent, so mouse // never draws over them. STATIC hit-tests transparent, so mouse
// input over the 3D view reaches the game window as before. // 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_w = client_w;
int view_h = COCKPIT_CANVAS(600); int view_h = client_h;
if (cockpit != NULL) if (cockpit != NULL)
{ {
cockpitViewscreen = CreateWindowExA( cockpitViewscreen = CreateWindowExA(
0, "STATIC", "", 0, "STATIC", "",
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_BLACKRECT, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_BLACKRECT,
(client_w - view_w) / 2, (client_h - view_h) / 2, 0, 0,
view_w, view_h, view_w, view_h,
cockpit, NULL, GetModuleHandleA(NULL), NULL); cockpit, NULL, GetModuleHandleA(NULL), NULL);
if (cockpitViewscreen != NULL) if (cockpitViewscreen != NULL)
@@ -3934,8 +3935,9 @@ SVGA16::SVGA16(
// 0x37.. / lower left 0x0F.. / lower right 0x07.. and the map // 0x37.. / lower left 0x0F.. / lower right 0x07.. and the map
// flanked by Secondary 0x10-0x15 / Screen 0x18-0x1D. // flanked by Secondary 0x10-0x15 / Screen 0x18-0x1D.
//--------------------------------------------------------------- //---------------------------------------------------------------
int top_glass_w = COCKPIT_CANVAS(640); // all five MFDs at the compact size, corners + top center
int top_glass_h = COCKPIT_CANVAS(480); int top_glass_w = COCKPIT_CANVAS(320);
int top_glass_h = COCKPIT_CANVAS(240);
int bot_glass_w = COCKPIT_CANVAS(320); int bot_glass_w = COCKPIT_CANVAS(320);
int bot_glass_h = COCKPIT_CANVAS(240); int bot_glass_h = COCKPIT_CANVAS(240);
int map_glass_w = COCKPIT_CANVAS(240); int map_glass_w = COCKPIT_CANVAS(240);
+2 -1
View File
@@ -81,8 +81,9 @@ TARGETFPS=60
Set-Content -Path "$dist\start-windowed.bat" -Encoding ascii -Value @" Set-Content -Path "$dist\start-windowed.bat" -Encoding ascii -Value @"
@echo off @echo off
rem Red Planet 4.12 - desktop prototype (windowed, local test mission) 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" 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 @" Set-Content -Path "$dist\README.txt" -Encoding ascii -Value @"