SonicAudioTools/Source/SonicAudioCmd/acb_extractor.txt
2016-11-12 19:02:48 +03:00

44 lines
1.1 KiB
Plaintext

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.IO.Compression;
using System.ComponentModel;
using System.Collections;
using SonicAudioLib;
using SonicAudioLib.Archive;
using SonicAudioLib.Collections;
using SonicAudioLib.IO;
using SonicAudioLib.CriMw;
using System.Xml;
namespace SonicAudioCmd
{
class Program
{
static void Main(string[] args)
{
using (CriTableReader reader = new CriTableReader(args[0]))
{
reader.Read();
using (Stream substream = reader.GetSubstream("AwbFile"))
{
Afs2Archive archive = new Afs2Archive(substream);
foreach (Afs2Entry entry in archive.Entries)
{
using (Stream entryStream = entry.Open(substream), outStream = File.Create(entry.CueIndex.ToString() + ".hca"))
{
entryStream.CopyTo(outStream);
}
}
}
}
}
}
}