// EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Emergent Game Technologies and may not // be copied or disclosed except in accordance with the terms of that // agreement. // // Copyright (c) 1996-2007 Emergent Game Technologies. // All Rights Reserved. // // Emergent Game Technologies, Chapel Hill, North Carolina 27517 // http://www.emergent.net // MDtMultParents.cpp // The purpose of this module is to extend the functionality of MDt // to cope with objects that have more than one parent. // Precompiled Headers #include "MDtAPIPCH.h" // Declare a global Joint Manager. // PhaseOut kMDtJointManager gJointMan; kMDtMultParentManager gMultParentMan; //--------------------------------------------------------------------------- kMDtMultParentManager::kMDtMultParentManager(void) { m_ppMultParentInfo = NULL; m_iUsed = 0; m_iAllocated = 0; } //--------------------------------------------------------------------------- kMDtMultParentManager::~kMDtMultParentManager(void) { Reset(); } //--------------------------------------------------------------------------- void kMDtMultParentManager::Reset(void) { for(int i=0; im_Node == mObj) { // It is. So just bump up the encounter count m_ppMultParentInfo[i]->iCurrent++; return m_ppMultParentInfo[i]->iCurrent; } } if (m_iUsed >= m_iAllocated) DoubleSpace(); int slot = m_iUsed; kMDtMultParentInfo* pJ = NiExternalNew kMDtMultParentInfo; pJ->m_Node = mObj; pJ->iCurrent = 0; pJ->iNumParents = iParentCnt; m_ppMultParentInfo[m_iUsed++] = pJ; return (0); // return the encounter (which is always zero) on this branch } //--------------------------------------------------------------------------- kMDtMultParentInfo* kMDtMultParentManager::Get( int iIndex ) { return m_ppMultParentInfo[iIndex]; } //---------------------------------------------------------------------------