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>
164 lines
4.3 KiB
C++
164 lines
4.3 KiB
C++
//===========================================================================//
|
|
// File: cammppr.hpp. //
|
|
// Project: MUNGA Brick: Camera Controls Mapper //
|
|
// Contents: Interface specification for camera mapper //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- -----------------------------------------------------------//
|
|
// 06/20/95 JM Initial Coding //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. All rights reserved //
|
|
// PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(CAMMPPR_HPP)
|
|
# define CAMMPPR_HPP
|
|
|
|
# if !defined (SUBSYSTM_HPP)
|
|
# include <subsystm.hpp>
|
|
# endif
|
|
|
|
# if !defined (CAMSHIP_HPP)
|
|
# include <camship.hpp>
|
|
# endif
|
|
|
|
# if !defined (CONTROLS_HPP)
|
|
# include <controls.hpp>
|
|
# endif
|
|
|
|
//##########################################################################
|
|
//####################### CameraControlsMapper ########################
|
|
//##########################################################################
|
|
class CameraControlsMapper:
|
|
public Subsystem
|
|
{
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Shared Data support
|
|
//
|
|
public:
|
|
static Derivation ClassDerivations;
|
|
static SharedData DefaultData;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Messaging Support
|
|
//
|
|
public:
|
|
enum {
|
|
KeypressMessageID = Subsystem::NextMessageID,
|
|
DirectorModeMessageID,
|
|
IncrementCameraMessageID,
|
|
DecrementCameraMessageID,
|
|
CreateCameraInstanceMessageID,
|
|
DeleteCameraInstanceMessageID,
|
|
OutputCameraInstancesMessageID,
|
|
NextMessageID
|
|
};
|
|
|
|
void
|
|
KeypressMessageHandler(ReceiverDataMessageOf<ControlsKey> *message);
|
|
|
|
void
|
|
DirectorModeMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
void
|
|
IncrementCameraMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
void
|
|
DecrementCameraMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
void
|
|
CreateCameraInstanceMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
void
|
|
DeleteCameraInstanceMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
void
|
|
OutputCameraInstancesMessageHandler(
|
|
ReceiverDataMessageOf<ControlsButton> *message
|
|
);
|
|
|
|
protected:
|
|
static const HandlerEntry
|
|
MessageHandlerEntries[];
|
|
static MessageHandlerSet
|
|
MessageHandlers;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Attribute Support
|
|
//
|
|
public:
|
|
enum {
|
|
StickPositionAttributeID = Subsystem::NextAttributeID,
|
|
ThrottlePositionAttributeID,
|
|
PedalsPositionAttributeID,
|
|
ReverseThrustAttributeID,
|
|
DriveCameraAttributeID,
|
|
SlideOrClampAttributeID,
|
|
NextAttributeID
|
|
};
|
|
private:
|
|
static const IndexEntry AttributePointers[];
|
|
|
|
protected:
|
|
static AttributeIndexSet AttributeIndex;
|
|
|
|
//
|
|
// public attribute declarations go here
|
|
//
|
|
public:
|
|
ControlsJoystick stickPosition;
|
|
Scalar throttlePosition;
|
|
Scalar pedalsPosition;
|
|
ControlsButton
|
|
reverseThrust,
|
|
driveCamera,
|
|
slideOrClamp;
|
|
|
|
//##########################################################################
|
|
// Model support
|
|
//
|
|
public:
|
|
|
|
CameraShip*
|
|
GetEntity()
|
|
{return (CameraShip*)Subsystem::GetEntity();}
|
|
|
|
typedef void
|
|
(CameraControlsMapper::*Performance)(Scalar time_slice);
|
|
|
|
void
|
|
SetPerformance(Performance performance)
|
|
{
|
|
Check(this);
|
|
activePerformance = (Simulation::Performance)performance;
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction and Destruction
|
|
//
|
|
protected:
|
|
CameraControlsMapper(
|
|
CameraShip *owner,
|
|
int subsystem_ID,
|
|
SubsystemResource *subsystem_resource,
|
|
SharedData &shared_data
|
|
);
|
|
|
|
public:
|
|
~CameraControlsMapper();
|
|
|
|
Logical
|
|
TestInstance() const;
|
|
};
|
|
#endif
|