diff --git a/MUNGA_L4/L4MFDVIEW.cpp b/MUNGA_L4/L4MFDVIEW.cpp index e3fccb4..a762ef7 100644 --- a/MUNGA_L4/L4MFDVIEW.cpp +++ b/MUNGA_L4/L4MFDVIEW.cpp @@ -490,6 +490,20 @@ void // one message per frame, and queued WM_PAINTs (lowest priority) starve // behind it - panes would freeze on their first frame. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Off screen, and stay off: the pane keeps its pixels and geometry, it +// simply stops being shown. Repaint() on a hidden window is harmless. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void + MFDSplitView::Hide() +{ + Check_Pointer(this); + if (window != NULL) + { + ShowWindow((HWND) window, SW_HIDE); + } +} + void MFDSplitView::SetPosition(int x, int y) { diff --git a/MUNGA_L4/L4MFDVIEW.h b/MUNGA_L4/L4MFDVIEW.h index 9948a3e..6328e9f 100644 --- a/MUNGA_L4/L4MFDVIEW.h +++ b/MUNGA_L4/L4MFDVIEW.h @@ -71,6 +71,12 @@ public: void Resize(int display_width, int display_height); + // Take the pane off screen. Used for the Winners Circle, which wants + // the whole viewscreen: the panes overlap it like the pod's bezels, + // so hiding them uncovers the full canvas underneath. + void + Hide(); + ~MFDSplitView(); Logical diff --git a/MUNGA_L4/L4VB16.cpp b/MUNGA_L4/L4VB16.cpp index 2684533..e3934fa 100644 --- a/MUNGA_L4/L4VB16.cpp +++ b/MUNGA_L4/L4VB16.cpp @@ -4161,6 +4161,29 @@ void } } +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Clear the glass off the screen for the Winners Circle. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void + SVGA16::HideSecondaryDisplays() +{ + Check_Pointer(this); + + if (!splitViews) + { + return; + } + for (int view = 0; view < SplitViewCount; ++view) + { + if (splitView[view] != NULL) + { + splitView[view]->Hide(); + } + } + DEBUG_STREAM << "SVGA16: secondary displays hidden for the podium\n" + << std::flush; +} + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Fit the 1920x1080 cockpit canvas into the given client area: one // uniform scale (so the canvas never stretches - a wider desktop just diff --git a/MUNGA_L4/L4VB16.h b/MUNGA_L4/L4VB16.h index e1954ce..1394ef6 100644 --- a/MUNGA_L4/L4VB16.h +++ b/MUNGA_L4/L4VB16.h @@ -349,6 +349,18 @@ public: GetCockpit() { return activeCockpit; } + //------------------------------------------------------------------ + // Take the six secondary displays off screen and leave the whole + // canvas to the viewscreen. The Winners Circle wants the podium + // uncluttered, and the panes are only bezels over the 3D - hiding + // them uncovers what is already being drawn behind. + // + // There is no matching show: the mission is over by the time this + // is called, and the next race builds a fresh cockpit. + //------------------------------------------------------------------ + void + HideSecondaryDisplays(); + protected: Logical splitViews; diff --git a/RP_L4/RPL4APP.cpp b/RP_L4/RPL4APP.cpp index c771da6..9e97a91 100644 --- a/RP_L4/RPL4APP.cpp +++ b/RP_L4/RPL4APP.cpp @@ -19,6 +19,7 @@ #include "..\munga\dropzone.h" #include "..\munga\director.h" #include "..\munga\nttmgr.h" +#include "..\munga_l4\l4vb16.h" // //############################################################################# @@ -267,6 +268,17 @@ void // RP412PODIUMCAM=0 leaves the view in the cockpit, which is also the // way to tell a bad camera from a scene that is not drawing at all. // + // + // Clear the cockpit glass away. The MFDs and the radar sit over the + // viewscreen like the pod's bezels and have nothing to say once the + // race is over; the podium gets the whole canvas. + // + SVGA16 *cockpit = SVGA16::GetCockpit(); + if (cockpit != NULL) + { + cockpit->HideSecondaryDisplays(); + } + // // Fog first: it pulls the clip plane in to 1100, and SetViewAngle is what // rebuilds the projection that reads it.