Files
firestorm/Gameleap/code/mw4/Libraries/ElementProxies/MLRIndexProxy.cpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
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.
2026-06-24 21:28:16 -05:00

93 lines
2.0 KiB
C++

#include "ElementProxyHeaders.hpp"
//
//############################################################################
//######################## MLRIndexProxy ########################
//############################################################################
//
MemoryBlock*
MLRIndexProxy::AllocatedMemory = NULL;
MLRIndexProxy::ClassData*
MLRIndexProxy::DefaultData = NULL;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
MLRIndexProxy::InitializeClass()
{
Verify(!AllocatedMemory);
AllocatedMemory =
new MemoryBlock(
sizeof(MLRIndexProxy),
10,
10,
"MLRIndexProxy"
);
Register_Object(AllocatedMemory);
Verify(!DefaultData);
DefaultData =
new ClassData(
MLRIndexProxyClassID,
"MLRIndexProxy",
IndexProxy::DefaultData
);
Register_Object(DefaultData);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
MLRIndexProxy::TerminateClass()
{
Unregister_Object(DefaultData);
delete DefaultData;
DefaultData = NULL;
Unregister_Object(AllocatedMemory);
delete AllocatedMemory;
AllocatedMemory = NULL;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
MLRIndexProxy::Destroy()
{
Check_Object(this);
Verify(referenceCount == 1);
STOP(("Not implemented"));
DetachReference();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
MLRIndexProxy::MLRIndexProxy(
MLRPolygonProxy *polygon,
MLRVertexProxy *vertex,
int polygon_index
):
IndexProxy(DefaultData, polygon, vertex),
polygonIndex(polygon_index)
{
Check_Pointer(this);
Check_Object(polygonProxy);
Check_Object(vertex);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
MLRIndexProxy::~MLRIndexProxy()
{
Check_Object(this);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
MLRIndexProxy::TestInstance() const
{
Verify(IsDerivedFrom(DefaultData));
}