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>
138 lines
3.1 KiB
C++
138 lines
3.1 KiB
C++
//===========================================================================//
|
|
// File: testclas.hh //
|
|
// Project: MUNGA Brick: Dynamic Dispatch, Event and Journalling //
|
|
// Contents: defines test classes for use by Dispatch and Events //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 11/03/94 JMA Initial coding. //
|
|
// 11/05/94 JMA Made compatible with GNU C++ //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1994, Virtual World Entertainment, Inc. All Rights reserved //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(TESTCLAS_HPP)
|
|
# define TESTCLAS_HPP)
|
|
|
|
# if !defined(RECEIVER_HPP)
|
|
# include "receiver.hpp"
|
|
# endif
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Alpha ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class Alpha:
|
|
public Receiver
|
|
{
|
|
protected:
|
|
static SharedData
|
|
DefaultData;
|
|
|
|
public:
|
|
int
|
|
x;
|
|
|
|
enum {
|
|
message0ID = Receiver::NextMessageID,
|
|
message1ID,
|
|
NextMessageID
|
|
};
|
|
|
|
static Derivation
|
|
ClassDerivations;
|
|
|
|
Alpha(
|
|
ClassID class_ID = TrivialReceiverClassID,
|
|
SharedData &vdata = DefaultData);
|
|
~Alpha();
|
|
|
|
void
|
|
Method0Handler(Message*);
|
|
void
|
|
Method1Handler(Message*);
|
|
|
|
inline void Method0()
|
|
{Message m(message0ID,sizeof(Message)); Dispatch(&m);}
|
|
inline void Method1()
|
|
{Message m(message1ID,sizeof(Message)); Dispatch(&m);}
|
|
|
|
static MessageHandlerSet
|
|
handlerSet;
|
|
};
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Beta ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class Beta:
|
|
public Alpha
|
|
{
|
|
protected:
|
|
static SharedData
|
|
DefaultData;
|
|
|
|
public:
|
|
enum {
|
|
message2ID=Alpha::NextMessageID,
|
|
message3ID,
|
|
NextMessageID
|
|
};
|
|
|
|
static Derivation
|
|
ClassDerivations;
|
|
|
|
Beta(
|
|
ClassID class_id = TrivialReceiverClassID,
|
|
SharedData &vdata = DefaultData
|
|
);
|
|
~Beta();
|
|
|
|
void
|
|
Method1aHandler(Message*);
|
|
void
|
|
Method2Handler(Message*);
|
|
void
|
|
Method3Handler(Message*);
|
|
|
|
inline void Method1()
|
|
{Message m(message1ID,sizeof(Message)); Dispatch(&m);}
|
|
inline void Method2()
|
|
{Message m(message2ID,sizeof(Message)); Dispatch(&m);}
|
|
inline void Method3()
|
|
{Message m(message3ID,sizeof(Message)); Dispatch(&m);}
|
|
|
|
static MessageHandlerSet
|
|
handlerSet;
|
|
};
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gamma ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class Gamma:
|
|
public Beta
|
|
{
|
|
public:
|
|
enum {
|
|
message4ID=Beta::NextMessageID,
|
|
NextMessageID
|
|
};
|
|
|
|
static Derivation
|
|
ClassDerivations;
|
|
|
|
Gamma();
|
|
~Gamma();
|
|
|
|
void
|
|
Method4Handler(Message*);
|
|
|
|
inline void Method4()
|
|
{Message m(message4ID,sizeof(Message)); Dispatch(&m);}
|
|
|
|
static MessageHandlerSet
|
|
handlerSet;
|
|
|
|
protected:
|
|
static SharedData
|
|
DefaultData;
|
|
};
|
|
|
|
#endif
|