mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 17:02:53 +08:00
YDR/XML conversion progress
This commit is contained in:
parent
cd4c87cd71
commit
9ed308df7a
File diff suppressed because it is too large
Load Diff
@ -278,7 +278,7 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
public virtual void WriteXml(StringBuilder sb, int indent, string ddsfolder)
|
public virtual void WriteXml(StringBuilder sb, int indent, string ddsfolder)
|
||||||
{
|
{
|
||||||
YtdXml.StringTag(sb, indent, "Name", Name);
|
YtdXml.StringTag(sb, indent, "Name", YtdXml.XmlEscape(Name));
|
||||||
YtdXml.ValueTag(sb, indent, "Unk32", Unknown_32h.ToString());
|
YtdXml.ValueTag(sb, indent, "Unk32", Unknown_32h.ToString());
|
||||||
}
|
}
|
||||||
public virtual void ReadXml(XmlNode node, string ddsfolder)
|
public virtual void ReadXml(XmlNode node, string ddsfolder)
|
||||||
|
@ -1910,16 +1910,20 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
private void ExportXml()
|
private void ExportXml()
|
||||||
{
|
{
|
||||||
bool isytd = false;//need a folder to output ytd XML to, for the texture .dds files
|
bool needfolder = false;//need a folder to output ytd XML to, for the texture .dds files
|
||||||
if (MainListView.SelectedIndices.Count == 1)
|
if (MainListView.SelectedIndices.Count == 1)
|
||||||
{
|
{
|
||||||
var idx = MainListView.SelectedIndices[0];
|
var idx = MainListView.SelectedIndices[0];
|
||||||
if ((idx < 0) || (idx >= CurrentFiles.Count)) return;
|
if ((idx < 0) || (idx >= CurrentFiles.Count)) return;
|
||||||
var file = CurrentFiles[idx];
|
var file = CurrentFiles[idx];
|
||||||
isytd = file?.File?.NameLower?.EndsWith(".ytd") == true;
|
var nl = file?.File?.NameLower;
|
||||||
|
if (!string.IsNullOrEmpty(nl))
|
||||||
|
{
|
||||||
|
needfolder = nl.EndsWith(".ytd") || nl.EndsWith(".ydr") || nl.EndsWith(".ydd") || nl.EndsWith(".yft") || nl.EndsWith(".ypt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((MainListView.SelectedIndices.Count == 1) && (!isytd))
|
if ((MainListView.SelectedIndices.Count == 1) && (!needfolder))
|
||||||
{
|
{
|
||||||
var idx = MainListView.SelectedIndices[0];
|
var idx = MainListView.SelectedIndices[0];
|
||||||
if ((idx < 0) || (idx >= CurrentFiles.Count)) return;
|
if ((idx < 0) || (idx >= CurrentFiles.Count)) return;
|
||||||
|
@ -1132,10 +1132,6 @@ namespace CodeWalker.Rendering
|
|||||||
{
|
{
|
||||||
IndexBuffer = Buffer.Create(device, BindFlags.IndexBuffer, DrawableGeom.IndexBuffer.Indices);
|
IndexBuffer = Buffer.Create(device, BindFlags.IndexBuffer, DrawableGeom.IndexBuffer.Indices);
|
||||||
}
|
}
|
||||||
else if (DrawableGeom.BoneIds != null)
|
|
||||||
{
|
|
||||||
IndexBuffer = Buffer.Create(device, BindFlags.IndexBuffer, DrawableGeom.BoneIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user