BTL4VideoRenderer answers MechClassID: walks the video-object chain the way the engine does, hands every L4VideoObject::Skeleton entry to ReadSKLFile, and recurses the .SKL into a dpl_DCS tree with geometry instanced onto it. Verified repeatedly on the live pod: '[skl] video\mad.skl -> 26 nodes, 19 objects', with no 'wrong video resource type' complaint and no load failures. Those counts are exactly what the file declares (25 joint= entries + root, 19 Object= entries). Corrects the earlier success criterion in this file, which said 22 instances by reading the reference capture's 'instance x22' against DZoneCount=22. Damage zones are not geometry -- 28 dzone= tags spread across 19 objects. Translations are written to matrix[3]/[7]/[11], MUNGA's own AffineMatrix layout. It walks cleanly but no frame has been seen WITH the mech yet, so the slot choice is recorded as unconfirmed. Rotation stays identity by design: every base-pose angle in MAD.SKL is 0 or ~1e-3, so translation alone assembles the model and isolates one convention at a time. AND A CORRECTION I have to flag loudly: I earlier concluded from single runs that non-identity translations crashed the pod, 'isolated' it, and 'confirmed' the alternative also crashed. That was all noise. The same binary re-run gives walk / crash / walk / crash -- the known intermittent plane-write defect is now firing on ~half of pod runs and lands at different points each time, which is precisely what made it look deterministic. Never accept a single pod run as evidence on this rig; require two agreeing runs. That defect is now the top of the list: a run must survive both the skeleton build and the launch to render anything, which at ~50% is a coin flip on a four-minute cycle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
88 lines
2.9 KiB
C++
88 lines
2.9 KiB
C++
//===========================================================================//
|
|
// File: btl4vid.hpp //
|
|
// Project: BattleTech //
|
|
// Contents: Implementation details for the BT video renderer //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(BTL4VID_HPP)
|
|
# define BTL4VID_HPP
|
|
|
|
# if !defined(L4VIDEO_HPP)
|
|
# include <l4video.hpp>
|
|
# endif
|
|
|
|
# include <dpl.h>
|
|
# include <dplutils.h>
|
|
|
|
//###########################################################################
|
|
//####################### BTL4VideoRenderer #############################
|
|
//###########################################################################
|
|
|
|
class BTL4VideoRenderer:
|
|
public DPLRenderer
|
|
{
|
|
public:
|
|
BTL4VideoRenderer(
|
|
RendererRate calibration_rate,
|
|
RendererComplexity calibration_complexity,
|
|
RendererPriority calibration_priority,
|
|
InterestType interest_type,
|
|
InterestDepth depth_calibration
|
|
);
|
|
~BTL4VideoRenderer();
|
|
|
|
protected:
|
|
void
|
|
LoadMissionImplementation(Mission *mission);
|
|
|
|
//
|
|
// The bottom of this virtual chain is
|
|
// VideoRenderer::MakeEntityRenderables (VIDREND.CPP:231), whose own
|
|
// comment says it is only reached when nobody above could figure out
|
|
// what to build -- and it just complains. The engine's DPLRenderer
|
|
// layer knows the ENGINE classes; the game's own classes are ours.
|
|
//
|
|
void
|
|
MakeEntityRenderables(
|
|
Entity *entity,
|
|
ResourceDescription *model_resource,
|
|
ViewFrom view_type);
|
|
|
|
//
|
|
// The mech's model resource is a SKELETON, not an object, and the
|
|
// engine rejects it ("wrong video resource type") because building
|
|
// one is the GAME renderer's job. Shape taken from the surviving
|
|
// sibling header CODE/RP/RP_L4/RPL4VID.HPP.
|
|
//
|
|
dpl_DCS *
|
|
ReadSKLFile(
|
|
Entity *entity,
|
|
const char *skeleton_filename,
|
|
ViewFrom view_type);
|
|
|
|
dpl_DCS *
|
|
RecurseSKLFile(
|
|
Entity *entity,
|
|
dpl_DCS *parent_dcs,
|
|
NotationFile *skeleton,
|
|
const char *page_name,
|
|
int recursion_depth,
|
|
ViewFrom view_type,
|
|
dpl_ZONE *zone,
|
|
int *node_count,
|
|
int *object_count);
|
|
|
|
protected:
|
|
int reserved[16];
|
|
};
|
|
|
|
#endif
|