The pod's secondary/radar cockpit surface now renders as an inset in the 800x600 dev window under BT_DEV_GAUGES: radar/tactical grid, SPEED/HEADING/ MAGNETIC/PROP dials, and the color-coded ARMOR DAMAGE mech schematic -- real gauge content (nzSec=27247), composited from the shared CPU pixelBuffer. Composite pass (engine): SVGA16::DrawDevInset palette-expands the secondary plane into a MANAGED texture on the MAIN device and draws an XYZRHW inset quad; BTDrawGaugeInset() reaches the gauge renderer's 'sec' port and is called from DPLRenderer::ExecuteImplementation as the last draw before EndScene. Three reconstruction bugs fixed to get real content: 1. BTL4Application::MakeGaugeRenderer signature mismatch (REAL fix): the reconstructed no-arg override only HID the 2007-engine's widened 3-arg virtual MakeGaugeRenderer(int*,int*,int*), so the engine built a base L4GaugeRenderer whose ctor never parsed gauge/l4gauge.cfg -> empty symbol table -> "undefined label 'bhk1Init'" -> no ports/gauges. Matched the 3-arg signature so it truly overrides (args ignored; BT is fullscreen). Same bug class as the BTL4GaugeRenderer(false,NULL,NULL,NULL) ctor fix. 2. Parse hung on undefined primitives (gated dev accommodation): the BT gauge primitive table (BTL4MethodDescription) is still a stub, so an unknown primitive -> ReportParsingError -> Fail() -> a MODAL dialog freezing the parse. Under BT_DEV_GAUGES, skip the unknown primitive's params so labels register and the base "configure" primitive builds the ports. 3. Gauge widgets AV on NULL data bindings (gated): NumericDisplayScalar's NULL value_pointer -> GaugeConnectionDirectOf ctor deref (bind NULL->static zero); RankAndScore::Execute derefs unreconstructed game state (Gauge::GuardedExecute SEH wrapper -> Disable(True) on first fault). All guards gated on BT_DEV_GAUGES: default DEV un-regressed (TARGET DESTROYED, 0 crashes) and the pod path is byte-unchanged (strict Fail, no guards). Remaining (docs/GAUGE_COMPOSITE.md): the real gauge WIDGET reconstruction (BTL4MethodDescription method table + gauge->game-state data bindings), then Step 2 (RP<->BT MFD port-name reconcile) + Step 3 (2-window layout). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
107 lines
3.3 KiB
C++
107 lines
3.3 KiB
C++
//===========================================================================//
|
|
// File: rp4lbe4.hh //
|
|
// Project: MUNGA Brick: Red Planet LBE Application //
|
|
// Contents: //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1994, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
//
|
|
// NOTE (reconstruction): This is the SURVIVING original header, recovered
|
|
// verbatim from
|
|
// 410SRC\Telsa40\Rel410\CODE\BT\BT_L4\BTL4APP.HPP
|
|
// (the stale file-banner above -- "rp4lbe4.hh / Red Planet" -- is a
|
|
// copy-paste artifact present in the shipped source and is preserved here
|
|
// for fidelity). btl4app.cpp is reconstructed to match this declaration
|
|
// exactly; see btl4app.cpp for the per-method @ADDR evidence.
|
|
//
|
|
|
|
#if !defined(BTL4APP_HPP)
|
|
# define BTL4APP_HPP
|
|
|
|
# if !defined(L4APP_HPP)
|
|
# include <l4app.hpp> // L4Application base (WinTesla MUNGA_L4)
|
|
# endif
|
|
# if !defined(APPMSG_HPP)
|
|
# include <appmsg.hpp> // RunMissionMessage / StopMissionMessage
|
|
# endif
|
|
|
|
# if !defined(BTL4MPPR_HPP)
|
|
# include <btl4mppr.hpp>
|
|
# endif
|
|
|
|
//##########################################################################
|
|
//###################### BTL4Application ##########################
|
|
//##########################################################################
|
|
|
|
//##########################################################################
|
|
//###################### RP4L4Application ############################
|
|
//##########################################################################
|
|
|
|
class BTL4Application:
|
|
public L4Application
|
|
{
|
|
public:
|
|
BTL4Application(
|
|
HINSTANCE hInstance,
|
|
HWND hWnd,
|
|
ResourceFile *resource_file,
|
|
ClassID class_ID=L4ApplicationClassID,
|
|
SharedData &shared_data=DefaultData
|
|
);
|
|
~BTL4Application();
|
|
|
|
static Derivation ClassDerivations;
|
|
static SharedData DefaultData;
|
|
|
|
private:
|
|
Registry*
|
|
MakeRegistry();
|
|
|
|
VideoRenderer*
|
|
MakeVideoRenderer();
|
|
|
|
AudioRenderer*
|
|
MakeAudioRenderer();
|
|
|
|
GaugeRenderer*
|
|
MakeGaugeRenderer(int *secondaryIndex, int *aux1Index, int *aux2Index);
|
|
|
|
ModeManager*
|
|
MakeModeManager();
|
|
|
|
ControlsManager*
|
|
MakeControlsManager();
|
|
|
|
Mission*
|
|
MakeMission(
|
|
NotationFile *notation_file,
|
|
ResourceFile *resources
|
|
);
|
|
|
|
Entity*
|
|
MakeViewpointEntity(Entity::MakeMessage *);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Message Support
|
|
//
|
|
private:
|
|
static const HandlerEntry MessageHandlerEntries[];
|
|
|
|
protected:
|
|
static MessageHandlerSet MessageHandlers;
|
|
|
|
void
|
|
RunMissionMessageHandler(RunMissionMessage *message);
|
|
void
|
|
StopMissionMessageHandler(StopMissionMessage *message);
|
|
|
|
};
|
|
|
|
#endif
|