Files
TeslaRel410/restoration/source410/BT/MECHMPPR.CPP
T
CydandClaude Fable 5 77041a1539 Mech phase 4: SetMappingSubsystem + MechControlsMapper ctor -- mech links as viewpoint
SetMappingSubsystem installs the control mapper into roster slot 0 (the streamed
control-mapping binds DirectMappings to subsystemID 0). MechControlsMapper ctor
constructs (per-frame InterpretControls deferred to phase 5). With RIO controls,
MakeViewpointEntity now builds the MechRIOMapper, installs it, and gets PAST the
controls check -- the mech constructs AND links as the viewpoint entity. Boot now
advances into the mission-startup / control-binding path (next: a real NULL-deref
there, deeper than the staged Fails). BT: 42 ok.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 07:11:41 -05:00

71 lines
1.8 KiB
C++

//===========================================================================//
// File: mechmppr.cpp //
// Project: BattleTech //
// Contents: Implementation details for the mech controls mapper //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#include <bt.hpp>
#pragma hdrstop
#if !defined(MECHMPPR_HPP)
# include <mechmppr.hpp>
#endif
Derivation
MechControlsMapper::ClassDerivations(
Subsystem::ClassDerivations,
"MechControlsMapper"
);
MechControlsMapper::SharedData
MechControlsMapper::DefaultData(
MechControlsMapper::ClassDerivations,
Subsystem::MessageHandlers,
Subsystem::AttributeIndex,
1
);
MechControlsMapper::MechControlsMapper(
Mech *owner,
int subsystem_ID,
CString subsystem_name,
RegisteredClass::ClassID class_ID,
SharedData &shared_data
):
Subsystem(
(Entity *)owner,
subsystem_ID,
subsystem_name,
class_ID,
shared_data
)
{
Check(owner);
//
// The mapper is the Mech's active control Performance; per-frame control
// interpretation (InterpretControls) is reconstructed with the mech2/3/4
// simulation (phase 5). Prime the published control state to neutral.
//
{
for (int i = 0; i < 64; ++i)
{
reserved[i] = 0;
}
}
Check_Fpu();
}
MechControlsMapper::~MechControlsMapper()
{
}
Logical
MechControlsMapper::TestInstance() const
{
return IsDerivedFrom(ClassDerivations);
}