Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
198 lines
5.0 KiB
C++
198 lines
5.0 KiB
C++
//===========================================================================//
|
|
// File: GUIObject.hpp //
|
|
// Project: Adept //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 04/21/99 DPB Initial coding. //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1998-1999, Virtual World Entertainment, Inc. //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#pragma once
|
|
|
|
#include "Adept.hpp"
|
|
#include "Receiver.hpp"
|
|
#include <ElementRenderer\ScreenQuadsElement.hpp>
|
|
|
|
namespace Adept
|
|
{
|
|
class GUIObject;
|
|
|
|
//##########################################################################
|
|
//########################### QuadIndexObject #########################
|
|
//##########################################################################
|
|
class QuadIndexObject:
|
|
public Plug
|
|
{
|
|
public:
|
|
QuadIndexObject(int index):
|
|
Plug(Plug::DefaultData)
|
|
{
|
|
quadIndex = index;
|
|
}
|
|
~QuadIndexObject()
|
|
{}
|
|
|
|
int
|
|
quadIndex;
|
|
};
|
|
//##########################################################################
|
|
//########################### ScreenQuadObject ########################
|
|
//##########################################################################
|
|
class ScreenQuadObject:
|
|
public Plug
|
|
{
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction, Destruction
|
|
//
|
|
public:
|
|
ScreenQuadObject(int size);
|
|
~ScreenQuadObject();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Class Data
|
|
//
|
|
public:
|
|
Stuff::SlotOf<ElementRenderer::ScreenQuadsElement*>
|
|
quadElement;
|
|
|
|
Stuff::MemoryStackOf<QuadIndexObject>
|
|
availableQuadStack;
|
|
|
|
};
|
|
|
|
//##########################################################################
|
|
//########################### GUIObject ###############################
|
|
//##########################################################################
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// The following helper classes must always be typedef'd or overriden by an
|
|
// inheritor
|
|
//
|
|
typedef Receiver__ClassData GUIObject__ClassData;
|
|
typedef Receiver__Message GUIObject__Message;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class GUIObject:
|
|
public Receiver
|
|
{
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Inheritance Support
|
|
//
|
|
public:
|
|
typedef GUIObject__ClassData ClassData;
|
|
typedef GUIObject__Message Message;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction, Destruction, Testing
|
|
//
|
|
public:
|
|
static void
|
|
InitializeClass();
|
|
static void
|
|
TerminateClass();
|
|
|
|
GUIObject(
|
|
ClassData *class_data,
|
|
Stuff::Page *page
|
|
);
|
|
|
|
GUIObject(
|
|
ClassData *class_data,
|
|
Stuff::MemoryStream *stream
|
|
);
|
|
|
|
GUIObject(ClassData *class_data);
|
|
|
|
virtual void
|
|
Save(Stuff::MemoryStream *stream);
|
|
|
|
~GUIObject();
|
|
|
|
void
|
|
TestInstance();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Class Data support
|
|
//
|
|
public:
|
|
static ClassData
|
|
*DefaultData;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Simulation Functions
|
|
//
|
|
public:
|
|
void
|
|
HideImage();
|
|
void
|
|
ShowImage();
|
|
virtual void
|
|
Draw() {};
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Data Accesors
|
|
//
|
|
public:
|
|
ElementRenderer::StateChange
|
|
*GetQuadState()
|
|
{Check_Object(this); return quadState;}
|
|
|
|
const Stuff::Vector4D
|
|
*GetPolyCorners()
|
|
{Check_Object(this); return polyCorners;}
|
|
|
|
Stuff::RGBAColor
|
|
*GetPolyColors()
|
|
{Check_Object(this); return polyColors;}
|
|
|
|
Stuff::Vector2DOf<Stuff::Scalar>
|
|
*GetPolyUVs()
|
|
{Check_Object(this); return polyUVs;}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Private Data
|
|
//
|
|
public:
|
|
MString
|
|
guiObjectName;
|
|
|
|
private:
|
|
ElementRenderer::StateChange
|
|
*quadState;
|
|
|
|
Stuff::Vector4D
|
|
*polyCorners;
|
|
|
|
Stuff::RGBAColor
|
|
*polyColors;
|
|
|
|
Stuff::Vector2DOf<Stuff::Scalar>
|
|
*polyUVs;
|
|
|
|
bool
|
|
*polyStatus;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Static Object Management
|
|
//
|
|
public:
|
|
static void
|
|
AdoptCamera(ElementRenderer::CameraElement *camera);
|
|
|
|
static void
|
|
RemoveCamera();
|
|
|
|
static ChainOf<ScreenQuadObject *>
|
|
*ScreenQuadGroups;
|
|
static ElementRenderer::CameraElement
|
|
*Camera;
|
|
|
|
};
|
|
}
|
|
|