//===========================================================================// // File: btl4grnd.hpp // // Project: BattleTech Brick: Gauge Renderer Manager // // Contents: // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 02/13/95 CPB Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1994, Virtual World Entertainment, Inc. All rights reserved // // PROPRIETARY and CONFIDENTIAL // //===========================================================================// // // SURVIVING HEADER (ground truth -- reproduced verbatim from // 410SRC/.../BT_L4/BTL4GRND.HPP). Only the File:/Brick: banner above was // corrected from the original (which carried a stale "rpl4grnd.hh" copy of // the Red Planet sibling's comment). The class declaration is unchanged. // // Implementation reconstructed in btl4grnd.cpp from the shipped binary: // BTL4GaugeRenderer ctor @004cbea0 (vtable 0051cebc) // ~BTL4GaugeRenderer @004cbf40 (vtable slot 0) // TestInstance @004cbf90 // NotifyOfNewInterestingEntity @004cbfa0 (vtable slot 9) // NotifyOfBecomingUninterestingEntity @004cc028 (vtable slot 10) // #if !defined(BTL4GRND_HPP) # define BTL4GRND_HPP # if !defined(L4GREND_HPP) # include # endif //~~~~~~~~~~~~~~~~~~~~~~~~~~ BTL4GaugeRenderer ~~~~~~~~~~~~~~~~~~~~~~~~~~ class BTL4GaugeRenderer: public L4GaugeRenderer { public: // //-------------------------------------------------------------------- // Construction, Destruction, Testing //-------------------------------------------------------------------- // BTL4GaugeRenderer(); ~BTL4GaugeRenderer(); Logical TestInstance() const; void NotifyOfNewInterestingEntity(Entity *entity); void NotifyOfBecomingUninterestingEntity(Entity *entity); // // PORT FIX (Gitea #12 -- NOT in the surviving 1995 header): tear the // built gauge tree down when the viewpoint mech is RE-STREAMED // in-session (pre-launch host drop/rejoin re-creates every mech; the // lobby-built tree's attribute pointers dangle and each widget is // permanently DISABLED by the BT_DEV_GAUGES SEH guard, GAUGE.cpp:618). // Performs the entity-bound half of the engine's mission-transition // teardown (GaugeRenderer::ShutdownImplementation, GAUGREND.cpp:3264): // alarms + all gauges + the entity grids. Warehouse / graphics ports / // interpreter / controls lamps stay -- entity-independent, reused by // the immediate ConfigureForModel rebuild. Called from // BTL4Application::MakeViewpointEntity before ConfigureForModel; // a no-op on the first (lobby) build. // void TearDownForViewpointRestream(); // Gitea #48 (THE MFD-ARTIFACT ROOT CAUSE): tear the previous // configuration's gauge tree down on EVERY viewpoint configure, then // build. The camera seat configures first (`cameraInit` -- which // includes the MISSION-REVIEW ports: `configure(0, sec, 0, 0x00FF, // native, rgb, mrpal.pcc)` -- a DirectColor context whose translation // tables hold full RGB565 values spanning ALL 16 plane bits); the swap // to the mech re-configures WITHOUT tearing that tree down (the // btl4app latch treats the mech build as "first"), so the review // gauges kept executing through their orphaned DirectColor ports and // every draw stamped pixels into EVERY display's plane -- the "stray // blocks / misplaced lamps" on Heat/Mfd/sec. Convicted live by the // BT_PLANE_AUDIT write trap: pixmap draws with mask 0x3F/0xC0 leaking // 0xFF00/0x3F at the review furniture positions. virtual void ConfigureForModel(const char *configuration_name, Entity *entity); }; #endif