Mech phase 2: reconstruct the last 6 segment-walk subsystem classes
Completes every class the Mech-ctor segment walk instantiates: Reservoir (: HeatSink), Searchlight + ThermalSight (: PowerWatcher), MechTech + Subsystem- MessageManager (: Subsystem, surviving CODE headers), Actuator (: MechSubsystem fallback). All ctors chain their parents; per-frame methods staged. Full subsystem roster (~22 classes) reconstructed. BT: 42 ok; tree links clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
#if !defined(ACTUATOR_HPP)
|
||||
# include <actuator.hpp>
|
||||
#endif
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
Derivation Actuator::ClassDerivations(MechSubsystem::ClassDerivations, "Actuator");
|
||||
Actuator::SharedData Actuator::DefaultData(Actuator::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount);
|
||||
Actuator::Actuator(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data)
|
||||
: MechSubsystem(owner, subsystem_ID, (MechSubsystem::SubsystemResource *)r, shared_data)
|
||||
{ Check(owner); Check_Pointer(r); Check_Fpu(); }
|
||||
Actuator::~Actuator() {}
|
||||
Logical Actuator::TestClass(Mech &) { return True; }
|
||||
Logical Actuator::TestInstance() const { return IsDerivedFrom(ClassDerivations); }
|
||||
@@ -0,0 +1,19 @@
|
||||
#if !defined(ACTUATOR_HPP)
|
||||
# define ACTUATOR_HPP
|
||||
# if !defined(MECHSUB_HPP)
|
||||
# include <mechsub.hpp>
|
||||
# endif
|
||||
class Mech;
|
||||
struct Actuator__SubsystemResource : public MechSubsystem::SubsystemResource {};
|
||||
class Actuator : public MechSubsystem
|
||||
{
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
static Logical TestClass(Mech &);
|
||||
Logical TestInstance() const;
|
||||
typedef Actuator__SubsystemResource SubsystemResource;
|
||||
Actuator(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data = DefaultData);
|
||||
~Actuator();
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
//===========================================================================//
|
||||
// File: mechtech.cpp //
|
||||
// Project: BattleTech Brick: Mech subsystems //
|
||||
// Contents: MechTech -- the on-board technician / repair subsystem //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
#if !defined(MECHTECH_HPP)
|
||||
# include <mechtech.hpp>
|
||||
#endif
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
|
||||
Derivation
|
||||
MechTech::ClassDerivations(Subsystem::ClassDerivations, "MechTech");
|
||||
|
||||
MechTech::SharedData
|
||||
MechTech::DefaultData(
|
||||
MechTech::ClassDerivations,
|
||||
Subsystem::MessageHandlers,
|
||||
Subsystem::AttributeIndex,
|
||||
Subsystem::StateCount
|
||||
);
|
||||
|
||||
MechTech::MechTech(
|
||||
Mech *entity,
|
||||
int subsystem_id,
|
||||
SubsystemResource *model,
|
||||
SharedData &shared_data
|
||||
):
|
||||
Subsystem(entity, subsystem_id, model, shared_data),
|
||||
subsystemMonitors(NULL)
|
||||
{
|
||||
Check(entity);
|
||||
Check_Pointer(model);
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
MechTech::~MechTech()
|
||||
{
|
||||
}
|
||||
|
||||
Logical
|
||||
MechTech::TestInstance() const
|
||||
{
|
||||
return IsDerivedFrom(ClassDerivations);
|
||||
}
|
||||
|
||||
Logical
|
||||
MechTech::CreateStreamedSubsystem(
|
||||
NotationFile *,
|
||||
const char *,
|
||||
const char *,
|
||||
SubsystemResource *,
|
||||
NotationFile *,
|
||||
const ResourceDirectories *,
|
||||
ResourceFile *
|
||||
)
|
||||
{
|
||||
Fail("MechTech::CreateStreamedSubsystem -- mechtech.cpp not yet reconstructed");
|
||||
return False;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//===========================================================================//
|
||||
// File: messmgr.cpp //
|
||||
// Project: BattleTech Brick: Mech subsystems //
|
||||
// Contents: SubsystemMessageManager -- the per-mech damage/explosion hub //
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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(MESSMGR_HPP)
|
||||
# include <messmgr.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
|
||||
Derivation
|
||||
SubsystemMessageManager::ClassDerivations(
|
||||
Subsystem::ClassDerivations,
|
||||
"SubsystemMessageManager"
|
||||
);
|
||||
|
||||
SubsystemMessageManager::SharedData
|
||||
SubsystemMessageManager::DefaultData(
|
||||
SubsystemMessageManager::ClassDerivations,
|
||||
Subsystem::MessageHandlers,
|
||||
Subsystem::AttributeIndex,
|
||||
Subsystem::StateCount
|
||||
);
|
||||
|
||||
SubsystemMessageManager::SubsystemMessageManager(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *sub_res,
|
||||
SharedData &shared_data
|
||||
):
|
||||
Subsystem(owner, subsystem_ID, sub_res, shared_data),
|
||||
weaponExplosions(NULL, False),
|
||||
damageInformation(NULL, False)
|
||||
{
|
||||
Check(owner);
|
||||
Check_Pointer(sub_res);
|
||||
|
||||
rendererCompensateTime = 0.0f;
|
||||
terrainHitExplosionID = ResourceDescription::NullResourceID;
|
||||
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
SubsystemMessageManager::~SubsystemMessageManager()
|
||||
{
|
||||
}
|
||||
|
||||
Logical
|
||||
SubsystemMessageManager::TestInstance() const
|
||||
{
|
||||
return IsDerivedFrom(ClassDerivations);
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// The per-frame damage/explosion consolidation. Not yet reconstructed.
|
||||
//#############################################################################
|
||||
//
|
||||
void
|
||||
SubsystemMessageManager::ConsolidateAndSendDamage(Scalar)
|
||||
{
|
||||
Fail("SubsystemMessageManager::ConsolidateAndSendDamage -- messmgr.cpp not yet reconstructed");
|
||||
}
|
||||
|
||||
void
|
||||
SubsystemMessageManager::CreateWeaponExplosions(Logical, EntityID, Point3D)
|
||||
{
|
||||
Fail("SubsystemMessageManager::CreateWeaponExplosions -- messmgr.cpp not yet reconstructed");
|
||||
}
|
||||
|
||||
void
|
||||
SubsystemMessageManager::AddDamageMessage(Entity *, Entity__TakeDamageMessage *)
|
||||
{
|
||||
Fail("SubsystemMessageManager::AddDamageMessage -- messmgr.cpp not yet reconstructed");
|
||||
}
|
||||
|
||||
Logical
|
||||
SubsystemMessageManager::CreateStreamedSubsystem(
|
||||
ResourceFile *,
|
||||
NotationFile *,
|
||||
const char *,
|
||||
const char *,
|
||||
SubsystemResource *,
|
||||
NotationFile *,
|
||||
const ResourceDirectories *
|
||||
)
|
||||
{
|
||||
Fail("SubsystemMessageManager::CreateStreamedSubsystem -- messmgr.cpp not yet reconstructed");
|
||||
return False;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
#if !defined(RESERVR_HPP)
|
||||
# include <reservr.hpp>
|
||||
#endif
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
Derivation Reservoir::ClassDerivations(HeatSink::ClassDerivations, "Reservoir");
|
||||
Reservoir::SharedData Reservoir::DefaultData(Reservoir::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount);
|
||||
Reservoir::Reservoir(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data)
|
||||
: HeatSink(owner, subsystem_ID, r, shared_data)
|
||||
{ Check(owner); Check_Pointer(r); Check_Fpu(); }
|
||||
Reservoir::~Reservoir() {}
|
||||
Logical Reservoir::TestClass(Mech &) { return True; }
|
||||
Logical Reservoir::TestInstance() const { return IsDerivedFrom(ClassDerivations); }
|
||||
@@ -0,0 +1,19 @@
|
||||
#if !defined(RESERVR_HPP)
|
||||
# define RESERVR_HPP
|
||||
# if !defined(HEAT_HPP)
|
||||
# include <heat.hpp>
|
||||
# endif
|
||||
class Mech;
|
||||
struct Reservoir__SubsystemResource : public HeatSink::SubsystemResource {};
|
||||
class Reservoir : public HeatSink
|
||||
{
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
static Logical TestClass(Mech &);
|
||||
Logical TestInstance() const;
|
||||
typedef Reservoir__SubsystemResource SubsystemResource;
|
||||
Reservoir(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data = DefaultData);
|
||||
~Reservoir();
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
#if !defined(SEARCHLT_HPP)
|
||||
# include <searchlt.hpp>
|
||||
#endif
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
Derivation Searchlight::ClassDerivations(PowerWatcher::ClassDerivations, "Searchlight");
|
||||
Searchlight::SharedData Searchlight::DefaultData(Searchlight::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount);
|
||||
Searchlight::Searchlight(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data)
|
||||
: PowerWatcher(owner, subsystem_ID, r, shared_data)
|
||||
{ Check(owner); Check_Pointer(r); Check_Fpu(); }
|
||||
Searchlight::~Searchlight() {}
|
||||
Logical Searchlight::TestClass(Mech &) { return True; }
|
||||
Logical Searchlight::TestInstance() const { return IsDerivedFrom(ClassDerivations); }
|
||||
@@ -0,0 +1,19 @@
|
||||
#if !defined(SEARCHLT_HPP)
|
||||
# define SEARCHLT_HPP
|
||||
# if !defined(POWERSUB_HPP)
|
||||
# include <powersub.hpp>
|
||||
# endif
|
||||
class Mech;
|
||||
struct Searchlight__SubsystemResource : public PowerWatcher::SubsystemResource {};
|
||||
class Searchlight : public PowerWatcher
|
||||
{
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
static Logical TestClass(Mech &);
|
||||
Logical TestInstance() const;
|
||||
typedef Searchlight__SubsystemResource SubsystemResource;
|
||||
Searchlight(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data = DefaultData);
|
||||
~Searchlight();
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
#if !defined(THERMSGT_HPP)
|
||||
# include <thermsgt.hpp>
|
||||
#endif
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
Derivation ThermalSight::ClassDerivations(PowerWatcher::ClassDerivations, "ThermalSight");
|
||||
ThermalSight::SharedData ThermalSight::DefaultData(ThermalSight::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount);
|
||||
ThermalSight::ThermalSight(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data)
|
||||
: PowerWatcher(owner, subsystem_ID, r, shared_data)
|
||||
{ Check(owner); Check_Pointer(r); Check_Fpu(); }
|
||||
ThermalSight::~ThermalSight() {}
|
||||
Logical ThermalSight::TestClass(Mech &) { return True; }
|
||||
Logical ThermalSight::TestInstance() const { return IsDerivedFrom(ClassDerivations); }
|
||||
@@ -0,0 +1,19 @@
|
||||
#if !defined(THERMSGT_HPP)
|
||||
# define THERMSGT_HPP
|
||||
# if !defined(POWERSUB_HPP)
|
||||
# include <powersub.hpp>
|
||||
# endif
|
||||
class Mech;
|
||||
struct ThermalSight__SubsystemResource : public PowerWatcher::SubsystemResource {};
|
||||
class ThermalSight : public PowerWatcher
|
||||
{
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
static Logical TestClass(Mech &);
|
||||
Logical TestInstance() const;
|
||||
typedef ThermalSight__SubsystemResource SubsystemResource;
|
||||
ThermalSight(Mech *owner, int subsystem_ID, SubsystemResource *r, SharedData &shared_data = DefaultData);
|
||||
~ThermalSight();
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user