Under the documented rig (launch_pod.ps1 with the GL bridge up) the 'couldn't load object' count went to ZERO. .BGF loading was never a reconstruction problem, only a missing bridge. What blocks now is a series of authored AttributeWatchers: BTL4.RES binds them BY NAME and the engine Fails outright on any that does not resolve, so each is a name our subsystems must publish. Five rungs climbed, each run-verified: UnstablePercentage, SpeedEffect (Myomers table), AnimationState + CollisionState/CollisionNormal + ReduceButton (Mech), and the full Torso table (all six authentic names mapped onto existing members). The method that makes this cheap is banked: the shipped binary's string pool carries each class's attribute names CONTIGUOUSLY in ID ORDER after the class name, and in every case so far our member declarations sit in the same order -- which confirms the layout and lets ids be pinned rather than guessed. Intersecting those names with BTL4.RES gives the exact work list. A THIRD miswired SharedData found on the way: Myomers carried Subsystem's tables where it derives from PoweredSubsystem, the same defect as MissileLauncher (5.3.33). Worth a sweep across every subsystem. Staged member TYPES are provisional and documented as such: AttributeWatcherOf reads *(T*)attributePointer and the instantiation comes from the resource, which the string pool does not reveal. Nothing drives them yet, so settle the types with the models that write them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
113 lines
3.6 KiB
C++
113 lines
3.6 KiB
C++
//===========================================================================//
|
|
// File: myomers.hpp //
|
|
// Project: BattleTech Brick: Mech subsystems //
|
|
// Contents: Myomers -- the artificial-muscle (locomotion power) subsystem //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(MYOMERS_HPP)
|
|
# define MYOMERS_HPP
|
|
|
|
# if !defined(POWERSUB_HPP)
|
|
# include <powersub.hpp>
|
|
# endif
|
|
|
|
//##################### Forward Class Declarations #######################
|
|
class Mech;
|
|
|
|
//###########################################################################
|
|
//#################### Myomers Model Resource ##########################
|
|
//###########################################################################
|
|
|
|
struct Myomers__SubsystemResource:
|
|
public PoweredSubsystem::SubsystemResource
|
|
{
|
|
Scalar velocityEfficiency;
|
|
Scalar accelerationEfficiency;
|
|
Scalar seekVoltage[5];
|
|
int seekVoltageRecommendedIndex;
|
|
};
|
|
|
|
//###########################################################################
|
|
//############################## Myomers ###############################
|
|
//###########################################################################
|
|
|
|
class Myomers:
|
|
public PoweredSubsystem
|
|
{
|
|
public:
|
|
static Derivation ClassDerivations;
|
|
static SharedData DefaultData;
|
|
|
|
typedef void
|
|
(Myomers::*Performance)(Scalar time_slice);
|
|
void
|
|
SetPerformance(Performance performance)
|
|
{
|
|
Check(this);
|
|
activePerformance = (Simulation::Performance)performance;
|
|
}
|
|
|
|
static Logical
|
|
TestClass(Mech &);
|
|
Logical
|
|
TestInstance() const;
|
|
void
|
|
MyomersSimulation(Scalar time_slice);
|
|
|
|
public:
|
|
typedef Myomers__SubsystemResource SubsystemResource;
|
|
|
|
Myomers(
|
|
Mech *owner,
|
|
int subsystem_ID,
|
|
SubsystemResource *subsystem_resource,
|
|
SharedData &shared_data = DefaultData
|
|
);
|
|
~Myomers();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Attribute publication. The shipped binary's string pool lists this
|
|
// class's attribute names contiguously, immediately after the class name
|
|
// "Myomers" and its ToggleSeekVoltage message:
|
|
//
|
|
// SpeedEffect CurrentSeekVoltageIndex RecommendedSeekVoltageIndex
|
|
// MinSeekVoltageIndex MaxSeekVoltageIndex SeekVoltage
|
|
//
|
|
// -- which is EXACTLY the order of the members below, so the
|
|
// reconstruction's layout matches the original and the ids can be
|
|
// pinned faithfully rather than guessed. SpeedEffect is the one an
|
|
// authored AttributeWatcher in BTL4.RES binds (the myomer whine).
|
|
//
|
|
public:
|
|
enum {
|
|
SpeedEffectAttributeID = PoweredSubsystem::NextAttributeID,
|
|
CurrentSeekVoltageIndexAttributeID,
|
|
RecommendedSeekVoltageIndexAttributeID,
|
|
MinSeekVoltageIndexAttributeID,
|
|
MaxSeekVoltageIndexAttributeID,
|
|
SeekVoltageAttributeID,
|
|
NextAttributeID
|
|
};
|
|
|
|
static const IndexEntry AttributePointers[];
|
|
static AttributeIndexSet AttributeIndex;
|
|
|
|
protected:
|
|
Scalar speedEffect;
|
|
int currentSeekVoltageIndex;
|
|
int recommendedSeekVoltageIndex;
|
|
int minSeekVoltageIndex;
|
|
int maxSeekVoltageIndex;
|
|
Scalar seekVoltage[5];
|
|
Scalar heatRange;
|
|
Scalar heatRangeSquared;
|
|
Scalar velocityEfficiency;
|
|
Scalar accelerationEfficiency;
|
|
};
|
|
|
|
#endif
|