All 10 surviving original TUs plus the reconstructed BTL4APP.CPP pilot build clean with the authentic OPT.MAK flags (compile410.sh --sweep). First time the 4.10 BattleTech source has compiled since 1996. - layout_probe.cpp: the period compiler measures 1995 layouts from the surviving headers; validated 3/3 against binary alloc sizes (BTMission 0xFC, BTL4ModeManager 0xC, BTRegistry 0x10). Base boundary: Simulation 0xD0 / Entity 0x1C4 / Mover 0x300 / JointedMover 0x328 => Mech-own region 0x328-0x854 (MECH-LAYOUT.md staging worksheet). - 13 staged headers close the family ([T3] reserved[]-parked layouts; interfaces PROVEN by the surviving consumers): MECH, MECHSUB, HEAT, POWERSUB, MECHWEAP, EMITTER, MECHMPPR, BTPLAYER (BTPlayer__MakeMessage = Player's 8 args + roleName/teamName [T1 via BTREG]), PROJTILE, MISSILE, BTL4MPPR, BTL4VID + the round-2 BTCNSL/BTSCNRL. - compile410.sh: PCH gate retired (bt.hpp/mungal4.hpp full include sets), DPL SDK roots on the include line. - BTL4APP.CPP: appmgr include + GetApplicationManager()->GetFrameRate() + ResourceDescription:: scoping; Fail() held at its recorded line 400. - Evidence ledgers: STAGED-HEADERS.NOTES.md, MECH-LAYOUT.md, BACKFILLS, BTCNSL (binary-recovered console wire IDs), BTSCNRL. Remaining for a linkable BTL4OPT: the ~40 missing TU bodies (917-function manifest) - the header skeleton they grow into now exists and compiles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
236 lines
6.9 KiB
C++
236 lines
6.9 KiB
C++
//===========================================================================//
|
|
// File: mech.hpp //
|
|
// Project: BattleTech Brick: Entity Manager //
|
|
// Contents: Implementation details for the Mech entity //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(MECH_HPP)
|
|
# define MECH_HPP
|
|
|
|
# if !defined(JMOVER_HPP)
|
|
# include <jmover.hpp>
|
|
# endif
|
|
|
|
# if !defined(RETICLE_HPP)
|
|
# include <reticle.hpp>
|
|
# endif
|
|
|
|
//##################### Forward Class Declarations #######################
|
|
class Mech;
|
|
class Subsystem;
|
|
class ControlsMapping;
|
|
class PlatformTool;
|
|
class MechControlsMapper;
|
|
class Mech__DamageZone;
|
|
|
|
//###########################################################################
|
|
//######################### Mech Model Resource #########################
|
|
//###########################################################################
|
|
|
|
struct Mech__ModelResource:
|
|
public JointedMover::ModelResource
|
|
{
|
|
char animationPrefix[4];
|
|
Scalar maxAcceleration;
|
|
Scalar superStopAcceleration;
|
|
Scalar throttleAdjustment;
|
|
Scalar lookLeftAngle;
|
|
Scalar lookRightAngle;
|
|
Scalar lookFrontAngle;
|
|
Scalar lookBackAngle;
|
|
Scalar walkingTurnRate;
|
|
Scalar runningTurnRate;
|
|
Scalar reticleX;
|
|
Scalar reticleY;
|
|
Scalar relativeMechValue;
|
|
int deathEffectResourceID;
|
|
Scalar deathSplashDamage;
|
|
Scalar deathSplashRadius;
|
|
Scalar maxUnstableAcceleration;
|
|
Scalar unstableAccelerationEffect;
|
|
Scalar unstableGunTheEngineEffect;
|
|
Scalar unstableSuperStopEffect;
|
|
Scalar unstableHighVelocityEffect;
|
|
Scalar unstableStopedTurnEffect;
|
|
Scalar updatePositionDiffrence;
|
|
Scalar updateTurnVelocityDiffrence;
|
|
Scalar updateTurnDegreeDiffrence;
|
|
Scalar timeDelay;
|
|
Vector3D cameraOffset;
|
|
char shadowJointName[20];
|
|
};
|
|
|
|
//###########################################################################
|
|
//########################## Mech Make Message ##########################
|
|
//###########################################################################
|
|
|
|
class Mech__MakeMessage:
|
|
public JointedMover::MakeMessage
|
|
{
|
|
public:
|
|
char resourceNameA[20];
|
|
char resourceNameB[20];
|
|
char resourceNameC[20];
|
|
|
|
Mech__MakeMessage(
|
|
Receiver::MessageID message_ID,
|
|
size_t length,
|
|
const EntityID &entity_ID,
|
|
Entity::ClassID class_ID,
|
|
const EntityID &owner_ID,
|
|
ResourceDescription::ResourceID resource_ID,
|
|
LWord instance_flags,
|
|
const Origin &origin,
|
|
const Motion &velocity,
|
|
const Motion &acceleration,
|
|
const char *badge,
|
|
const char *color,
|
|
const char *patch
|
|
):
|
|
JointedMover::MakeMessage(
|
|
message_ID, length, entity_ID, class_ID, owner_ID,
|
|
resource_ID, instance_flags, origin, velocity, acceleration
|
|
)
|
|
{
|
|
Str_Copy(resourceNameA, badge, sizeof(resourceNameA));
|
|
Str_Copy(resourceNameB, color, sizeof(resourceNameB));
|
|
Str_Copy(resourceNameC, patch, sizeof(resourceNameC));
|
|
}
|
|
};
|
|
|
|
//###########################################################################
|
|
//############################## Mech ###############################
|
|
//###########################################################################
|
|
|
|
class Mech:
|
|
public JointedMover
|
|
{
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Shared Data Support
|
|
//
|
|
public:
|
|
static Derivation ClassDerivations;
|
|
static SharedData DefaultData;
|
|
|
|
static const HandlerEntry
|
|
MessageHandlerEntries[];
|
|
static MessageHandlerSet
|
|
MessageHandlers;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Test Class Support
|
|
//
|
|
public:
|
|
static Logical
|
|
TestClass(Mech &);
|
|
Logical
|
|
TestInstance() const;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction and Destruction
|
|
//
|
|
public:
|
|
typedef Mech__ModelResource ModelResource;
|
|
typedef Mech__MakeMessage MakeMessage;
|
|
typedef Mech__DamageZone DamageZone;
|
|
|
|
static Mech*
|
|
Make(MakeMessage *creation_message);
|
|
|
|
Mech(
|
|
MakeMessage *creation_message,
|
|
SharedData &shared_data = DefaultData
|
|
);
|
|
~Mech();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// App interface
|
|
//
|
|
public:
|
|
void
|
|
SetMappingSubsystem(Subsystem *mapper);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Resource creation
|
|
//
|
|
public:
|
|
static void
|
|
CreateMakeMessage(
|
|
MakeMessage *creation_message,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories
|
|
);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateModelResource(
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories,
|
|
ModelResource *model = 0
|
|
);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateSubsystemStream(
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories
|
|
);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateDamageZoneStream(
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories
|
|
);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateSkeletonStream(
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories
|
|
);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateExplosionTableStream(
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories
|
|
);
|
|
|
|
typedef Logical (*FindNameFunction)(
|
|
const char *control_name, ControlsMapping *mapping);
|
|
|
|
static ResourceDescription::ResourceID
|
|
CreateControlMappingStream(
|
|
const char *mapping_name,
|
|
NotationFile *mapping_file,
|
|
FindNameFunction find_name,
|
|
ResourceFile *resource_file,
|
|
const char *model_name,
|
|
NotationFile *model_file,
|
|
const ResourceDirectories *directories,
|
|
PlatformTool *current_tool
|
|
);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Local Data
|
|
//
|
|
protected:
|
|
int reserved[331];
|
|
};
|
|
|
|
#endif
|