Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
125 lines
2.9 KiB
C++
125 lines
2.9 KiB
C++
|
|
#pragma once
|
|
|
|
#include "MW4.hpp"
|
|
#include "Subsystem.hpp"
|
|
|
|
namespace MechWarrior4
|
|
{
|
|
class Vehicle;
|
|
|
|
typedef Subsystem__ClassData ECM__ClassData;
|
|
typedef Subsystem__Message ECM__Message;
|
|
typedef Subsystem__ExecutionStateEngine ECM__ExecutionStateEngine;
|
|
typedef Subsystem__CreateMessage ECM__CreateMessage;
|
|
|
|
//##########################################################################
|
|
//########################### ECM GameModel ###########################
|
|
//##########################################################################
|
|
|
|
class ECM__GameModel:
|
|
public Subsystem::GameModel
|
|
{
|
|
public:
|
|
typedef Subsystem::GameModel BaseClass;
|
|
|
|
Stuff::Scalar
|
|
m_targeterMissileLockPercent;
|
|
|
|
enum {
|
|
TargeterMissileLockPercentAttributeID = Subsystem__GameModel::NextAttributeID,
|
|
NextAttributeID
|
|
};
|
|
|
|
static bool
|
|
ReadAndVerify(
|
|
ECM__GameModel *model,
|
|
ModelAttributeEntry *attribute_entry,
|
|
const char *data,
|
|
char **error,
|
|
int error_buffer = 128
|
|
);
|
|
|
|
|
|
static void
|
|
ConstructGameModel(Script *script);
|
|
|
|
};
|
|
|
|
//##########################################################################
|
|
//########################### ECM #####################################
|
|
//##########################################################################
|
|
|
|
class ECM:
|
|
public Subsystem
|
|
{
|
|
public:
|
|
static void
|
|
InitializeClass();
|
|
static void
|
|
TerminateClass();
|
|
|
|
//##########################################################################
|
|
// Inheritance support
|
|
//
|
|
public:
|
|
typedef ECM__ClassData ClassData;
|
|
typedef ECM__GameModel GameModel;
|
|
typedef ECM__Message Message;
|
|
typedef ECM__ExecutionStateEngine ExecutionStateEngine;
|
|
typedef ECM__CreateMessage CreateMessage;
|
|
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Run-time Construction and Destruction Support
|
|
//
|
|
public:
|
|
static ECM*
|
|
Make(
|
|
CreateMessage *message,
|
|
ReplicatorID *base_id
|
|
);
|
|
|
|
protected:
|
|
ECM(
|
|
ClassData *class_data,
|
|
CreateMessage *message,
|
|
ReplicatorID *base_id,
|
|
ElementRenderer::Element *element
|
|
);
|
|
|
|
~ECM();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Class Data & Game Model Support
|
|
//
|
|
public:
|
|
const GameModel*
|
|
GetGameModel()
|
|
{return Cast_Pointer(const GameModel*, gameModelResource.GetPointer());}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Shared Data support
|
|
//
|
|
public:
|
|
static ClassData
|
|
*DefaultData;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Simulation Support
|
|
//
|
|
public:
|
|
void
|
|
DestroySubsystem();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Test Support
|
|
//
|
|
public:
|
|
void
|
|
TestInstance() const;
|
|
};
|
|
}
|
|
|
|
|