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>
130 lines
3.7 KiB
C++
130 lines
3.7 KiB
C++
//===========================================================================//
|
|
// File: entity2.cc //
|
|
// Project: MUNGA Brick: Entity Manager //
|
|
// Contents: Implementation details of the entity class //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 11/29/94 JMA Initial coding. //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1994-1995, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#include <munga.hpp>
|
|
#pragma hdrstop
|
|
|
|
#if !defined(HOSTMGR_HPP)
|
|
# include <hostmgr.hpp>
|
|
#endif
|
|
|
|
#if !defined(REGISTRY_HPP)
|
|
# include <registry.hpp>
|
|
#endif
|
|
|
|
#if !defined(APP_HPP)
|
|
#include <app.hpp>
|
|
#endif
|
|
|
|
#if !defined(NAMELIST_HPP)
|
|
#include <namelist.hpp>
|
|
#endif
|
|
|
|
#if !defined(NOTATION_HPP)
|
|
#include <notation.hpp>
|
|
#endif
|
|
|
|
#if !defined(ENTITY_HPP)
|
|
#include <entity.hpp>
|
|
#endif
|
|
|
|
//##########################################################################
|
|
//############# Entity::StaticVideoSocketIterator ####################
|
|
//##########################################################################
|
|
|
|
Entity__StaticVideoSocketIterator::Entity__StaticVideoSocketIterator(
|
|
Entity *entity
|
|
):
|
|
SChainIteratorOf<Component*>(&entity->staticVideoSocket)
|
|
{
|
|
}
|
|
|
|
Entity__StaticVideoSocketIterator::Entity__StaticVideoSocketIterator(
|
|
const Entity__StaticVideoSocketIterator &iterator
|
|
):
|
|
SChainIteratorOf<Component*>(iterator)
|
|
{
|
|
}
|
|
|
|
Entity__StaticVideoSocketIterator::~Entity__StaticVideoSocketIterator()
|
|
{
|
|
}
|
|
|
|
//##########################################################################
|
|
//############# Entity::DynamicVideoSocketIterator ###################
|
|
//##########################################################################
|
|
|
|
Entity__DynamicVideoSocketIterator::Entity__DynamicVideoSocketIterator(
|
|
Entity *entity
|
|
):
|
|
SChainIteratorOf<Component*>(&entity->dynamicVideoSocket)
|
|
{
|
|
}
|
|
|
|
Entity__DynamicVideoSocketIterator::Entity__DynamicVideoSocketIterator(
|
|
const Entity__DynamicVideoSocketIterator &iterator
|
|
):
|
|
SChainIteratorOf<Component*>(iterator)
|
|
{
|
|
}
|
|
|
|
Entity__DynamicVideoSocketIterator::~Entity__DynamicVideoSocketIterator()
|
|
{
|
|
}
|
|
|
|
//##########################################################################
|
|
//################ Entity::AudioSocketIterator #######################
|
|
//##########################################################################
|
|
|
|
Entity__AudioSocketIterator::Entity__AudioSocketIterator(Entity *entity):
|
|
SChainIteratorOf<Component*>(&entity->audioSocket)
|
|
{
|
|
}
|
|
|
|
Entity__AudioSocketIterator::~Entity__AudioSocketIterator()
|
|
{
|
|
}
|
|
|
|
int
|
|
Find_Subsystem_Index(
|
|
NotationFile *file,
|
|
const char* name
|
|
)
|
|
{
|
|
Check(file);
|
|
Check_Pointer(name);
|
|
|
|
NameList *namelist = file->MakePageList();
|
|
Register_Object(namelist);
|
|
NameList::Entry *entry = namelist->GetFirstEntry();
|
|
|
|
int count = 0;
|
|
while (entry)
|
|
{
|
|
if (!strcmp(name, entry->GetName()))
|
|
{
|
|
Unregister_Object(namelist);
|
|
delete namelist;
|
|
return count;
|
|
}
|
|
++count;
|
|
entry = entry->GetNextEntry();
|
|
}
|
|
|
|
Unregister_Object(namelist);
|
|
delete namelist;
|
|
return (!strcmp(name, "None")) ? count : -1;
|
|
}
|
|
|