YBN/XML conversion

This commit is contained in:
dexy
2020-01-16 18:03:24 +11:00
Unverified
parent cad632ba6f
commit 2939e76118
6 changed files with 676 additions and 165 deletions
+10 -1
View File
@@ -3516,7 +3516,8 @@ namespace CodeWalker.GameFiles
}
public void TestYbns()
{
bool savetest = true;
bool xmltest = true;
bool savetest = false;
bool reloadtest = false;
var errorfiles = new List<RpfEntry>();
foreach (RpfFile file in AllRpfs)
@@ -3538,6 +3539,14 @@ namespace CodeWalker.GameFiles
UpdateStatus("Error! " + ex.ToString());
errorfiles.Add(entry);
}
if (xmltest && (ybn != null) && (ybn.Bounds != null))
{
var xml = YbnXml.GetXml(ybn);
var ybn2 = XmlYbn.GetYbn(xml);
var xml2 = YbnXml.GetXml(ybn2);
if (xml.Length != xml2.Length)
{ }
}
if (savetest && (ybn != null) && (ybn.Bounds != null))
{
var fentry = entry as RpfFileEntry;