Files
firestorm/Gameleap/code/mw4/Tools/Max43DSPlugins/Proxies/MakeSingleSided.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

133 lines
3.0 KiB
C++

#include "ProxyHeaders.hpp"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
bool
ChildProxy::MakeSingleSided(MakeSingleSidedProcess *process)
{
Check_Object(this);
Check_Object(process);
process->MirrorCallback(this);
return true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
bool
PolygonMeshProxy::MakeSingleSided(MakeSingleSidedProcess *process)
{
Check_Object(this);
Check_Object(process);
//
//--------------------------
// Make sure we can continue
//--------------------------
//
process->MirrorCallback(this);
if (!process->continueProcess)
return true;
STOP(("Not implemented"));
return true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
bool
GroupProxy::MakeSingleSided(MakeSingleSidedProcess *process)
{
Check_Object(this);
Check_Object(process);
//
//--------------------------
// Make sure we can continue
//--------------------------
//
process->MirrorCallback(this);
if (!process->continueProcess)
return true;
//
//-------------------
// Split the children
//-------------------
//
unsigned child_count = GetChildCount();
ChildProxy *child = UseFirstChildProxy();
for (unsigned i=0; i<child_count; ++i)
{
Check_Object(child);
ChildProxy *next = child->UseNextSiblingProxy();
if (child->MakeSingleSided(process))
child->DetachReference();
child = next;
if (!process->continueProcess)
{
if (child)
child->DetachReference();
break;
}
}
//
//-------------------------------------------
// Make sure to discard any remaining proxies
//-------------------------------------------
//
if (child)
child->DetachReference();
return true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
SceneProxy::MakeSingleSided(MakeSingleSidedProcess *process)
{
Check_Object(this);
Check_Object(process);
//
//--------------------------
// Make sure we can continue
//--------------------------
//
process->MirrorCallback(this);
if (!process->continueProcess)
return;
//
//-------------------
// Split the children
//-------------------
//
unsigned child_count = GetChildCount();
ChildProxy *child = UseFirstChildProxy();
unsigned i;
for (i=0; i<child_count; ++i)
{
Check_Object(child);
ChildProxy *next = child->UseNextSiblingProxy();
if (child->MakeSingleSided(process))
child->DetachReference();
child = next;
if (!process->continueProcess)
{
if (child)
child->DetachReference();
break;
}
}
//
//------------------------------------------------------------------------
// Make sure to discard any remaining proxies, and bypass the second phase
// of the sort if the process has been aborted
//------------------------------------------------------------------------
//
if (child)
child->DetachReference();
}