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.
100 lines
2.2 KiB
C++
100 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "ElementRenderer.hpp"
|
|
|
|
namespace gosFX {
|
|
class Effect;
|
|
}
|
|
|
|
namespace ElementRenderer {
|
|
|
|
//#########################################################################
|
|
//######################### gosFXElement ################################
|
|
//#########################################################################
|
|
|
|
class gosFXElement:
|
|
public Element
|
|
{
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Initialization
|
|
//
|
|
public:
|
|
static void InitializeClass();
|
|
static void TerminateClass();
|
|
static ClassData *DefaultData;
|
|
|
|
typedef Element BaseClass;
|
|
|
|
static HGOSHEAP s_Heap;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Constructors/Destructors
|
|
//
|
|
protected:
|
|
gosFXElement(
|
|
Stuff::MemoryStream *stream,
|
|
int version
|
|
);
|
|
|
|
public:
|
|
gosFXElement(gosFX::Effect *adopted_effect);
|
|
~gosFXElement();
|
|
|
|
static gosFXElement* Make(
|
|
Stuff::MemoryStream *stream,
|
|
int version,
|
|
ShapeHolder shapes=NULL
|
|
);
|
|
|
|
void Save(Stuff::MemoryStream *stream);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Testing
|
|
//
|
|
public:
|
|
void TestInstance();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Hierarchy
|
|
//
|
|
protected:
|
|
void AttachChild(Element *child);
|
|
void DetachChild(Element *child);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Collision
|
|
//
|
|
protected:
|
|
bool CastCulledRay(CollisionQuery *query);
|
|
Element* FindSmallestElementContainingCulled(SphereTest *test);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Drawing
|
|
//
|
|
protected:
|
|
void SetDrawState();
|
|
static DrawMethod DrawMethods[DrawStateCount];
|
|
|
|
void InheritDrawMethod(
|
|
CameraElement *camera,
|
|
const StateChange *inherited_state,
|
|
int clipping_state
|
|
);
|
|
void OverrideDrawMethod(
|
|
CameraElement *camera,
|
|
const StateChange *inherited_state,
|
|
int clipping_state
|
|
);
|
|
|
|
int CountTriangles();
|
|
|
|
public:
|
|
gosFX::Effect* GetEffect()
|
|
{Check_Object(this); return m_effect;}
|
|
|
|
protected:
|
|
gosFX::Effect *m_effect;
|
|
};
|
|
|
|
}
|