mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 04:34:47 +08:00
Support YFD XML import/export
This commit is contained in:
@@ -281,7 +281,7 @@ namespace CodeWalker
|
||||
InitFileType(".fxc", "Compiled Shaders", 9, FileTypeAction.ViewFxc, true);
|
||||
InitFileType(".yed", "Expression Dictionary", 9, FileTypeAction.ViewYed, true);
|
||||
InitFileType(".yld", "Cloth Dictionary", 9, FileTypeAction.ViewYld, true);
|
||||
InitFileType(".yfd", "Frame Filter Dictionary", 9, FileTypeAction.ViewYfd);
|
||||
InitFileType(".yfd", "Frame Filter Dictionary", 9, FileTypeAction.ViewYfd, true);
|
||||
InitFileType(".asi", "ASI Plugin", 9);
|
||||
InitFileType(".dll", "Dynamic Link Library", 9);
|
||||
InitFileType(".exe", "Executable", 10);
|
||||
@@ -1772,9 +1772,9 @@ namespace CodeWalker
|
||||
private void ViewYfd(string name, string path, byte[] data, RpfFileEntry e)
|
||||
{
|
||||
var yfd = RpfFile.GetFile<YfdFile>(e, data);
|
||||
GenericForm f = new GenericForm(this);
|
||||
MetaForm f = new MetaForm(this);
|
||||
f.Show();
|
||||
f.LoadFile(yfd, yfd.RpfFileEntry);
|
||||
f.LoadMeta(yfd);
|
||||
}
|
||||
private void ViewCacheDat(string name, string path, byte[] data, RpfFileEntry e)
|
||||
{
|
||||
|
||||
@@ -388,6 +388,20 @@ namespace CodeWalker.Forms
|
||||
metaFormat = MetaFormat.Ypdb;
|
||||
}
|
||||
}
|
||||
public void LoadMeta(YfdFile yfd)
|
||||
{
|
||||
var fn = ((yfd?.RpfFileEntry?.Name) ?? "") + ".xml";
|
||||
Xml = MetaXml.GetXml(yfd, out fn);
|
||||
FileName = fn;
|
||||
RawPropertyGrid.SelectedObject = yfd;
|
||||
rpfFileEntry = yfd?.RpfFileEntry;
|
||||
modified = false;
|
||||
metaFormat = MetaFormat.XML;
|
||||
if (yfd?.RpfFileEntry != null)
|
||||
{
|
||||
metaFormat = MetaFormat.Yfd;
|
||||
}
|
||||
}
|
||||
public void LoadMeta(MrfFile mrf)
|
||||
{
|
||||
var fn = ((mrf?.RpfFileEntry?.Name) ?? "") + ".xml";
|
||||
|
||||
Reference in New Issue
Block a user