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

150 lines
3.8 KiB
C++

//===========================================================================//
// File: entity2.hh //
// Project: MUNGA Brick: Entity Manager //
// Contents: Interface specification for entity class //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 11/29/94 JMA Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1994, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(NTTMGR_HPP)
#define NTTMGR_HPP
#if !defined(NAMELIST_HPP)
#include <namelist.hpp>
#endif
#if !defined(NODE_HPP)
#include <node.hpp>
#endif
#if !defined(CHAIN_HPP)
#include <chain.hpp>
#endif
#if !defined(NETWORK_HPP)
#include <network.hpp>
#endif
class Entity;
//##########################################################################
//######################### EntityGroup ##############################
//##########################################################################
class EntityGroup:
public Node
{
friend class EntityManager;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction and Destruction
//
protected:
EntityGroup();
~EntityGroup();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Naming functions
//
public:
const char*
GetGroupName()
{Check(this); return groupName;}
protected:
const char
*groupName;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Grouping functions
//
public:
void
Add(Entity *entity)
{
Check(this);
groupMembers.Add(Cast_Object(Node*,entity));
}
void
Add(EntityGroup *group)
{Check(this); Check(group); groupMembers.Add(group);}
ChainOf<Node*>
groupMembers;
};
//##########################################################################
//######################## EntityManager #############################
//##########################################################################
class EntityManager:
public NetworkClient
{
friend class Entity;
//##########################################################################
// Shared Data support
//
protected:
static Derivation
ClassDerivations;
static SharedData
DefaultData;
//##########################################################################
// Construction and destruction support
//
public:
EntityManager();
~EntityManager();
void
FryDeathRow();
protected:
EntityGroup
*deathRow;
//##########################################################################
// Message packet receiving
//
public:
void
ReceiveNetworkPacket(
NetworkPacket *packet,
Receiver::Message *packet_message
);
//##########################################################################
// Entity grouping
//
public:
EntityGroup*
UseGroup(const char *name);
EntityGroup*
FindGroup(const char *name)
{
Check_Pointer(name);
return (EntityGroup*)groupList.FindObject(name);
}
void
RemoveGroup(EntityGroup* group);
Logical
TestInstance() const;
protected:
ObjectNameList
groupList;
};
#endif