mirror of
https://github.com/blueskythlikesclouds/SonicAudioTools.git
synced 2024-11-24 07:00:11 +01:00
44 lines
1.1 KiB
Plaintext
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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|