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.
133 lines
3.0 KiB
C++
133 lines
3.0 KiB
C++
#include "ProxyHeaders.hpp"
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
bool
|
|
ChildProxy::OptimizeFlatShading(OptimizeFlatShadingProcess *process)
|
|
{
|
|
Check_Object(this);
|
|
Check_Object(process);
|
|
process->OptimizeCallback(this);
|
|
return true;
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
bool
|
|
PolygonMeshProxy::OptimizeFlatShading(OptimizeFlatShadingProcess *process)
|
|
{
|
|
Check_Object(this);
|
|
Check_Object(process);
|
|
|
|
//
|
|
//--------------------------
|
|
// Make sure we can continue
|
|
//--------------------------
|
|
//
|
|
process->OptimizeCallback(this);
|
|
if (!process->continueProcess)
|
|
return true;
|
|
|
|
STOP(("Not implemented"));
|
|
return true;
|
|
}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
bool
|
|
GroupProxy::OptimizeFlatShading(OptimizeFlatShadingProcess *process)
|
|
{
|
|
Check_Object(this);
|
|
Check_Object(process);
|
|
|
|
//
|
|
//--------------------------
|
|
// Make sure we can continue
|
|
//--------------------------
|
|
//
|
|
process->OptimizeCallback(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->OptimizeFlatShading(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::OptimizeFlatShading(OptimizeFlatShadingProcess *process)
|
|
{
|
|
Check_Object(this);
|
|
Check_Object(process);
|
|
|
|
//
|
|
//--------------------------
|
|
// Make sure we can continue
|
|
//--------------------------
|
|
//
|
|
process->OptimizeCallback(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->OptimizeFlatShading(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();
|
|
}
|