5
0
mirror of synced 2024-11-24 06:50:10 +01:00

Try to create a _metdata-format.xml for every mode

This commit is contained in:
windyfairy 2019-10-11 06:15:07 +09:00
parent 99ab3a04b0
commit d5ab2c16b4

View File

@ -587,10 +587,12 @@ namespace gitadora_texbintool
rectInfoList.Add(rectInfo); rectInfoList.Add(rectInfo);
} }
if (!splitImages) {
formatMetadata.FormatInfo.Add(new FormatInfo{ formatMetadata.FormatInfo.Add(new FormatInfo{
Filename = entry.Filename, Filename = entry.Filename,
FormatType = data[0x2c] FormatType = data[0x2c]
}); });
}
foreach (var rectInfo in rectInfoList) foreach (var rectInfo in rectInfoList)
{ {
@ -625,6 +627,13 @@ namespace gitadora_texbintool
File.WriteAllBytes(outputFilename, extractedData); File.WriteAllBytes(outputFilename, extractedData);
// File.WriteAllBytes(outputFilename.Replace(ext, ".bin"), data); // File.WriteAllBytes(outputFilename.Replace(ext, ".bin"), data);
if (splitImages) {
formatMetadata.FormatInfo.Add(new FormatInfo{
Filename = rectInfo.Filename,
FormatType = data[0x2c]
});
}
} }
} }
} }
@ -637,12 +646,9 @@ namespace gitadora_texbintool
} }
} }
if (!splitImages)
{
Serialize<FormatMetadata>(formatMetadata, Path.Combine(outputPath, "_metadata-format.xml")); Serialize<FormatMetadata>(formatMetadata, Path.Combine(outputPath, "_metadata-format.xml"));
} }
} }
}
static List<byte> CreateNameSection(List<string> filelist_unique) static List<byte> CreateNameSection(List<string> filelist_unique)
{ {