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>
178 lines
5.3 KiB
C++
178 lines
5.3 KiB
C++
//===========================================================================//
|
|
// File: intorgn.cpp //
|
|
// Project: MUNGA Brick: Interest Manager //
|
|
// Contents: Interface specification Interest Manager //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 10/28/94 ECH Initial coding. //
|
|
// 11/03/94 ECH Develop to munga spec //
|
|
// 11/29/94 JMA Changed Identities to IDs //
|
|
// 02/10/95 CPB Added GaugeInterestType //
|
|
//---------------------------------------------------------------------------//
|
|
// 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(INTORGN_HPP)
|
|
#include <intorgn.hpp>
|
|
#endif
|
|
|
|
#if !defined(APP_HPP)
|
|
#include <app.hpp>
|
|
#endif
|
|
|
|
#if !defined(INTEREST_HPP)
|
|
#include <interest.hpp>
|
|
#endif
|
|
|
|
//#############################################################################
|
|
//####################### InterestOrigin ################################
|
|
//#############################################################################
|
|
|
|
//
|
|
//#############################################################################
|
|
// InterestOrigin
|
|
//#############################################################################
|
|
//
|
|
InterestOrigin::InterestOrigin(
|
|
InterestZoneID interest_zone_ID,
|
|
InterestType interest_type,
|
|
InterestDepth depth_calibration
|
|
):
|
|
interestArenaSocket(NULL)
|
|
{
|
|
interestZoneID = interest_zone_ID;
|
|
interestType = interest_type;
|
|
depthCalibration = depth_calibration;
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// ~InterestOrigin
|
|
//#############################################################################
|
|
//
|
|
InterestOrigin::~InterestOrigin()
|
|
{
|
|
InterestArena *interest_arena;
|
|
|
|
Check(&interestArenaSocket);
|
|
if ((interest_arena = interestArenaSocket.GetCurrent()) != NULL)
|
|
{
|
|
Unregister_Object(interest_arena);
|
|
delete interest_arena;
|
|
}
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// TestInstance
|
|
//#############################################################################
|
|
//
|
|
Logical
|
|
InterestOrigin::TestInstance() const
|
|
{
|
|
Node::TestInstance();
|
|
|
|
Verify(interestZoneID != NullInterestZoneID);
|
|
Verify(
|
|
interestType == VisualInterestType ||
|
|
interestType == AudioInterestType ||
|
|
interestType == GaugeInterestType ||
|
|
interestType == CollisionInterestType
|
|
);
|
|
Check(&interestArenaSocket);
|
|
|
|
return True;
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// Update
|
|
//#############################################################################
|
|
//
|
|
void
|
|
InterestOrigin::Update(
|
|
#if DEBUG_LEVEL>0
|
|
InterestZoneID interest_zone_ID
|
|
#else
|
|
InterestZoneID
|
|
#endif
|
|
)
|
|
{
|
|
Check(this);
|
|
Verify(interest_zone_ID != NullInterestZoneID);
|
|
|
|
#if 0
|
|
//
|
|
// If (the interest zone has changed)
|
|
//
|
|
//
|
|
// Calculate the new interest arena for this interest origin
|
|
//
|
|
|
|
//
|
|
// Add this interest origin to a "changed" list
|
|
//
|
|
#else
|
|
//
|
|
// HACK - there is only one interest zone right now...
|
|
//
|
|
if (interestArenaSocket.GetCurrent() == NULL)
|
|
{
|
|
InterestManager *interest_manager;
|
|
|
|
Check(application);
|
|
interest_manager = application->GetInterestManager();
|
|
Check(interest_manager);
|
|
Check(interest_manager->GetInterestLatticeManager());
|
|
|
|
InterestArena *interest_arena =
|
|
interest_manager->GetInterestLatticeManager()->MakeInterestArena(
|
|
(InterestZoneID)0,
|
|
(InterestType)0,
|
|
(InterestDepth)0
|
|
);
|
|
Register_Object(interest_arena);
|
|
|
|
interestArenaSocket.Add(interest_arena);
|
|
Verify(interest_arena == interestArenaSocket.GetCurrent());
|
|
}
|
|
#endif
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
//#############################################################################
|
|
//
|
|
void
|
|
InterestOrigin::AddInterestingEntity(Entity*)
|
|
{
|
|
Fail("InterestOrigin::AddInterestingEntity - Should never reach here\n");
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
//#############################################################################
|
|
//
|
|
void
|
|
InterestOrigin::RemoveUninterestingEntity(Entity*)
|
|
{
|
|
Fail("InterestOrigin::RemoveUninterestingEntity - Should never reach here\n");
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
//#############################################################################
|
|
//
|
|
void
|
|
InterestOrigin::RemoveUninterestingEntities()
|
|
{
|
|
Fail("InterestOrigin::RemoveUninterestingEntities - Should never reach here\n");
|
|
}
|
|
|