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>
109 lines
3.2 KiB
C++
109 lines
3.2 KiB
C++
//===========================================================================//
|
|
// File: model.hpp //
|
|
// Project: MUNGA Brick: Model Manager //
|
|
// Contents: Interface specification of model class //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 01/25/95 JMA Initial coding. //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(STATE_HPP)
|
|
# define STATE_HPP
|
|
|
|
# if !defined(CMPNNT__HPP)
|
|
# include <cmpnnt.hpp>
|
|
# endif
|
|
|
|
# if !defined(SCHAIN_HPP)
|
|
# include <schain.hpp>
|
|
# endif
|
|
|
|
//##########################################################################
|
|
//##################### StateIndicator ###############################
|
|
//##########################################################################
|
|
|
|
class StateIndicator:
|
|
public Node
|
|
{
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction and Destruction
|
|
//
|
|
public:
|
|
StateIndicator();
|
|
StateIndicator(unsigned max_states);
|
|
StateIndicator(const StateIndicator &state_indicator);
|
|
~StateIndicator();
|
|
|
|
StateIndicator&
|
|
operator=(const StateIndicator&);
|
|
|
|
Logical
|
|
operator==(const StateIndicator&) const;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// State stuff
|
|
//
|
|
public:
|
|
unsigned
|
|
GetState()
|
|
{Check(this); return currentState;}
|
|
unsigned
|
|
GetOldState()
|
|
{Check(this); return oldState;}
|
|
void
|
|
SetState(unsigned new_state);
|
|
|
|
protected:
|
|
unsigned
|
|
stateCount,
|
|
oldState,
|
|
currentState;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Watcher stuff
|
|
//
|
|
public:
|
|
void
|
|
AddAudioWatcher(Component *watcher)
|
|
{Check(&audioWatcherSocket);audioWatcherSocket.Add(watcher);}
|
|
void
|
|
AddVideoWatcher(Component *watcher)
|
|
{Check(&videoWatcherSocket);videoWatcherSocket.Add(watcher);}
|
|
void
|
|
AddGaugeWatcher(Component *watcher)
|
|
{Check(&gaugeWatcherSocket);gaugeWatcherSocket.Add(watcher);}
|
|
|
|
private:
|
|
SChainOf<Component*>
|
|
audioWatcherSocket;
|
|
SChainOf<Component*>
|
|
videoWatcherSocket;
|
|
SChainOf<Component*>
|
|
gaugeWatcherSocket;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Stream input/output methods
|
|
//
|
|
public:
|
|
friend ostream&
|
|
operator << (
|
|
ostream &strm,
|
|
const StateIndicator &state_indicator
|
|
);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Test Support
|
|
//
|
|
public:
|
|
Logical
|
|
TestInstance() const;
|
|
static Logical
|
|
TestClass();
|
|
};
|
|
|
|
#endif
|