31 lines
868 B
C#
31 lines
868 B
C#
using LibXom;
|
|
using LibXom.Blocks;
|
|
using LibXom.Data;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
|
|
namespace Worms4Editor
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
XomFile xfile = XomReader.ReadXomFile(@"SaveGame.xom");
|
|
|
|
foreach(XomType type in xfile.XomTypes)
|
|
{
|
|
Console.WriteLine(type.Name);
|
|
|
|
if (Directory.Exists(type.Name)) Directory.Delete(type.Name, true);
|
|
|
|
Directory.CreateDirectory(type.Name);
|
|
foreach(XomContainer container in type.Containers)
|
|
{
|
|
string name = Path.Combine(type.Name, container.Id.ToString("X") + ".bin");
|
|
File.WriteAllBytes(name, container.GetData());
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
} |