Files
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

193 lines
4.9 KiB
C++

//===========================================================================//
// File: director.hh //
// Project: Munga //
// Contents: Chooses from a Selection of Camerea's and provides information //
// to any number of cameraship's as to which player to follow //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 08/09/95 JM Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(DIRECTOR_HPP)
# define DIRECTOR_HPP
# if !defined(STYLE_HPP)
# include <style.hpp>
# endif
# if !defined(PLAYER_HPP)
# include <player.hpp>
# endif
# if !defined(SCHAIN_HPP)
# include <schain.hpp>
# endif
# if !defined(CAMSHIP_HPP)
# include <camship.hpp>
# endif
# if !defined(GRAPH2D_HPP)
# include <graph2d.hpp>
# endif
# if !defined(SLOT_HPP)
# include <slot.hpp>
# endif
//##########################################################################
//################# CameraDirector::AttachCameraShip #################
//##########################################################################
class CameraDirector__AttachCameraShipMessage:
public Player::Message
{
public:
EntityID
cameraShipID;
CameraDirector__AttachCameraShipMessage(
Receiver::MessageID message_ID,
size_t length,
EntityID camera_ship_ID
):
Entity::Message(message_ID, length),
cameraShipID(camera_ship_ID)
{}
};
//##########################################################################
//############################# CameraDirector #############################
//##########################################################################
class CameraDirector:
public Player
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Shared Data support
//
public:
static Derivation ClassDerivations;
static SharedData DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Messaging support
//
public:
friend class CameraDirector__AttachCameraShipMessage;
enum{
AttachCameraShipMessageID = Entity::NextMessageID,
NextMessageID
};
typedef CameraDirector__AttachCameraShipMessage AttachCameraShipMessage;
void
AttachCameraShipMessageHandler(AttachCameraShipMessage *message);
protected:
static const HandlerEntry
MessageHandlerEntries[];
static MessageHandlerSet
MessageHandlers;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Simulation Support
//
public:
typedef void
(CameraDirector::*Performance)(Scalar time_slice);
void
SetPerformance(Performance performance)
{
Check(this);
activePerformance = (Simulation::Performance)performance;
}
void
CreateCameraShip(Scalar time_slice);
void
BeADirector(Scalar time_slice);
void
UpdateHUD(Scalar time_slice);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction and Destruction Support
//
public:
CameraDirector(
MakeMessage *creation_message,
SharedData &virtual_data = DefaultData
);
static CameraDirector*
CameraDirector::Make(CameraDirector::MakeMessage *creation_message);
~CameraDirector();
Logical
TestInstance() const;
enum {
DefaultFlags = Entity::DefaultFlags | PreRunFlag | CameraShipPlayerFlag
};
static Player*
FindPlayerByRank(int rank_to_find);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Simulation Support Data & Functions
//
protected:
SlotOf<Entity*>
goalEntity;
void
SetGoalEntity(Entity *goal_entity)
{
Check(this);
goalEntity.Remove();
Check(goal_entity);
goalEntity.Add(goal_entity);
}
Entity*
GetGoalEntity()
{Check(this); return goalEntity.GetCurrent(); }
Scalar
timeLeftOnPlayer;
CameraShip
*cameraShip;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// HUD Support
//
public:
int
goalPlayerIndex;
Logical
displayRankingWindow;
Scalar
timeDisplayed,
timeTillDisplayed,
displayIntervalOn,
displayIntervalOff;
};
#endif