public void Restore() { TEX0Node tNode = Node as TEX0Node; PLT0Node pNode = tNode.GetPaletteNode(); if ((tNode.IsDirty) || (tNode.IsBranch)) { if (pNode != null) { pNode.Restore(); } tNode.Restore(); } else { ResourceTree t = Tree; if (t.IsWorkingCopy) { string path = Program.GetFilePath(_relativePath, false); using (ResourceNode oldNode = NodeFactory.FromFile(null, path)) { ResourceNode origNode = oldNode.FindChild(_nodePath, false); if (pNode != null) { ResourceNode origp = ((TEX0Node)origNode).GetPaletteNode(); pNode.ReplaceRaw(origp.WorkingUncompressed.Address, origp.WorkingUncompressed.Length); } tNode.ReplaceRaw(origNode.WorkingUncompressed.Address, origNode.WorkingUncompressed.Length); } } } }
internal void ExportAllCostume() { ResourceTree tree = ResourceCache.GetTree(_path); if (tree != null) { string path = Program.OpenFolder(); ((ARCNode)tree.Node).ExtractToFolder(path); } }
private void OnTreeLoaded(ResourceTree tree) { if (tree.RelativePath.Equals(_relativePath, StringComparison.OrdinalIgnoreCase)) { if ((Node != null) && (DataChanged != null)) { DataChanged(this); } } }