Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet', built on the MUNGA engine and its L4 (Win32/DirectX) platform layer: - MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend - RP / RP_L4: Red Planet game logic and Win32 application - DivLoader, Setup1: asset loader and installer project - lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies Removed stale Subversion metadata and added .gitignore/.gitattributes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+156
@@ -0,0 +1,156 @@
|
||||
#pragma once
|
||||
|
||||
#include "vtvsub.h"
|
||||
|
||||
//##########################################################################
|
||||
//##################### 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 *GetClassDerivations();
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
BurnTimeRemainingAttributeID = VTVSubsystem::NextAttributeID,
|
||||
BoostersRemainingAttributeID,
|
||||
ScaleFactorAttributeID,
|
||||
SmokeDensityAttributeID,
|
||||
PercentDoneAttributeID,
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
private:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
protected:
|
||||
////static AttributeIndexSet AttributeIndex
|
||||
static AttributeIndexSet& GetAttributeIndex();
|
||||
|
||||
//
|
||||
// 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;
|
||||
};
|
||||
Reference in New Issue
Block a user