Files
TeslaRel410/CODE/RP/RP/BOOSTER.HPP
T
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

175 lines
4.8 KiB
C++

//===========================================================================//
// File: booster.hh //
// Project: Red Planet //
// Contents: Interface specification for vectored thrust vehicles //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 03/13/95 JM Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(BOOSTER_HPP)
# define BOOSTER_HPP
# if !defined(VTVSUB_HPP)
# include <vtvsub.hpp>
# endif
//##########################################################################
//##################### Booster::SubsystemResource ###################
//##########################################################################
struct Booster__SubsystemResource:
public VTVSubsystem::SubsystemResource
{
int boosterCount;
Scalar
burnTime,
boosterAcceleration;
};
//##########################################################################
//############################ Booster ###############################
//##########################################################################
class Booster:
public VTVSubsystem
{
friend class VTV;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Messageing Support
//
public:
enum {
ActivateMessageID = VTVSubsystem::NextMessageID,
ConfigureMappablesMessageID,
ChooseButtonMessageID,
NextMessageID
};
void
ActivateMessageHandler(
ReceiverDataMessageOf<ControlsButton> *message
);
void
ConfigureMappablesMessageHandler(
ReceiverDataMessageOf<ControlsButton> *message
);
void
ChooseButtonMessageHandler(
ReceiverDataMessageOf<ControlsButton> *message
);
protected:
static const HandlerEntry
MessageHandlerEntries[];
static MessageHandlerSet
MessageHandlers;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Shared Data support
//
public:
static Derivation ClassDerivations;
static SharedData DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Attribute Support
//
public:
enum {
BurnTimeRemainingAttributeID = VTVSubsystem::NextAttributeID,
BoostersRemainingAttributeID,
ScaleFactorAttributeID,
SmokeDensityAttributeID,
PercentDoneAttributeID,
NextAttributeID
};
private:
static const IndexEntry AttributePointers[];
protected:
static AttributeIndexSet AttributeIndex;
//
// public attribute declarations go here
//
public:
Scalar burnTimeRemaining;
Scalar boostersRemaining;
Vector3D scaleFactor;
Scalar smokeDensity;
Scalar percentDone;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Model Support
//
public:
enum {
BoosterBurning = Subsystem::StateCount,
StateCount
};
typedef void
(Booster::*Performance)(Scalar time_slice);
void
BoosterSimulation(Scalar time_slice);
void
SetPerformance(Performance performance)
{
Check(this);
activePerformance = (Simulation::Performance)performance;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Damage Support
//
void
DeathReset(int reset_command);
void
DeathShutdown(int shutdown_command);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction and Destruction
//
public:
typedef Booster__SubsystemResource SubsystemResource;
static int
CreateStreamedSubsystem(
NotationFile *model_file,
const char *model_name,
const char *subsystem_name,
SubsystemResource *subsystem_resource,
NotationFile *subsystem_file,
const ResourceDirectories *directories
);
Booster(
VTV *owner,
int subsystem_ID,
SubsystemResource *subsystem_resource
);
~Booster();
Logical
TestInstance() const;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Local data for the Booster class
//
protected:
Scalar burnTimeMax;
Scalar acceleration;
int maxBoosters;
};
#endif