public override void OnPopulate() { uint numFiles = 0; MRGFileHeader *entry = Header->First; for (int i = 0; i < (numFiles = Header->_numFiles); i++, entry = entry->Next) { if (NodeFactory.FromAddress(this, Header + entry->Data, entry->Length) == null) { new ARCEntryNode().Initialize(this, Header + entry->Data, entry->Length); } } }
public override void OnRebuild(VoidPtr address, int size, bool force) { MRGHeader *header = (MRGHeader *)address; *header = new MRGHeader((uint)Children.Count); MRGFileHeader *entry = header->First; foreach (ARCEntryNode node in Children) { *entry = new MRGFileHeader(node._calcSize, offset); node.Rebuild(header + entry->Data, node._calcSize, force); offset += node._calcSize; entry = entry->Next; } }