static void RecurseFillInGroups(CWorldNode* pNode, CBaseEditObj* pPutInGroup) { //sanity check if(!pNode) return; //the object that we will give to the children to put their objects in CBaseEditObj* pRecursePutIn = pPutInGroup; //first off, see if this node is an object if(pNode->GetType() == Node_Object) { //we have an object, lets see if this is a group object, if so this will be fed to //the children if(stricmp(pNode->GetClassName(), GROUP_CLASS_NAME) == 0) { //this is indeed a group pRecursePutIn = (CBaseEditObj*)pNode; } //we need to add this into the actual group object if it exists if(pPutInGroup) { AddObjectToList(pPutInGroup, pNode->GetName()); } } //now we need to recurse into all of the children GPOS Pos = pNode->m_Children; while(Pos) { CWorldNode* pChild = pNode->m_Children.GetNext(Pos); RecurseFillInGroups(pChild, pRecursePutIn); } }
void GameBase::AddToObjectList( ObjectList *pObjList, eObjListControl eControl /*= eObjListNODuplicates*/ ) { if( !pObjList ) return; // Just add us... AddObjectToList( pObjList, m_hObject, eControl ); }
static int AddSubToGroup(BRLYT* brlyt, int group, LYTSub sub) { return AddObjectToList((u8**)&brlyt->entries[group].tag.grp.subs, \ (u32*)&brlyt->entries[group].tag.grp.subcnts, \ (u8*)&sub, sizeof(LYTSub)); }
static int AddTexCoordToPic(BRLYT* brlyt, int pic, LYTTexCoord coord) { return AddObjectToList((u8**)&brlyt->entries[pic].tag.pic.texcoords, \ (u32*)&brlyt->entries[pic].tag.pic.texcoordcnt, \ (u8*)&coord, sizeof(LYTTexCoord)); }
static int AddEntryToBRLYT(BRLYT* brlyt, LYTEntry entry) { return AddObjectToList((u8**)&brlyt->entries, (u32*)&brlyt->entrycnt, \ (u8*)&entry, sizeof(LYTEntry)); }
static U8Dir* AddDirToDir(U8Dir* arc, U8Dir dir) { return &arc->dirs[AddObjectToList((u8**)&arc->dirs, \ (u32*)&arc->dircnt, \ (u8*)&dir, sizeof(U8Dir))]; }
static void AddFileToDir(U8Dir* arc, U8File file) { AddObjectToList((u8**)&arc->files, \ (u32*)&arc->filecnt, \ (u8*)&file, sizeof(U8File)); }