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.
117 lines
2.6 KiB
C++
117 lines
2.6 KiB
C++
#include "ProxyHeaders.hpp"
|
|
|
|
//
|
|
//############################################################################
|
|
//######################## IndexProxy ##########################
|
|
//############################################################################
|
|
//
|
|
|
|
IndexProxy::ClassData*
|
|
IndexProxy::DefaultData = NULL;
|
|
MemoryBlock*
|
|
IndexProxy::AllocatedMemory = NULL;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
void
|
|
IndexProxy::InitializeClass()
|
|
{
|
|
Verify(!AllocatedMemory);
|
|
AllocatedMemory =
|
|
new MemoryBlock(
|
|
sizeof(IndexProxy),
|
|
100,
|
|
100,
|
|
"IndexProxy"
|
|
);
|
|
Register_Object(AllocatedMemory);
|
|
|
|
Verify(!DefaultData);
|
|
DefaultData =
|
|
new ClassData(
|
|
IndexProxyClassID,
|
|
"IndexProxy",
|
|
GenericProxy::DefaultData
|
|
);
|
|
Register_Object(DefaultData);
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
void
|
|
IndexProxy::TerminateClass()
|
|
{
|
|
Unregister_Object(DefaultData);
|
|
delete DefaultData;
|
|
DefaultData = NULL;
|
|
|
|
Unregister_Object(AllocatedMemory);
|
|
delete AllocatedMemory;
|
|
AllocatedMemory = NULL;
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
IndexProxy::IndexProxy(
|
|
ClassData *class_data,
|
|
PolygonProxy *polygon,
|
|
VertexProxy *index
|
|
):
|
|
GenericProxy(class_data),
|
|
polygonProxy(polygon),
|
|
vertexProxy(index)
|
|
{
|
|
Check_Pointer(this);
|
|
Check_Object(polygonProxy);
|
|
polygonProxy->AttachIndexProxy(this);
|
|
Check_Object(vertexProxy);
|
|
vertexProxy->AttachIndexProxy(this);
|
|
Check_Object(this);
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
IndexProxy::IndexProxy(
|
|
PolygonProxy *polygon,
|
|
VertexProxy *index
|
|
):
|
|
GenericProxy(DefaultData),
|
|
polygonProxy(polygon),
|
|
vertexProxy(index)
|
|
{
|
|
Check_Pointer(this);
|
|
Check_Object(polygonProxy);
|
|
polygonProxy->AttachIndexProxy(this);
|
|
Check_Object(vertexProxy);
|
|
vertexProxy->AttachIndexProxy(this);
|
|
Check_Object(this);
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
IndexProxy::~IndexProxy()
|
|
{
|
|
Check_Object(this);
|
|
Check_Object(polygonProxy);
|
|
polygonProxy->DetachIndexProxy(this);
|
|
vertexProxy->DetachIndexProxy(this);
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
void
|
|
IndexProxy::Destroy()
|
|
{
|
|
Check_Object(this);
|
|
Verify(referenceCount == 1);
|
|
DetachReference();
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
void
|
|
IndexProxy::TestInstance() const
|
|
{
|
|
Verify(IsDerivedFrom(DefaultData));
|
|
}
|