mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 08:55:39 +08:00
feat: no-xtx spc archive support (#1)
* feat: extract no-xtx spc archive * feat: revert xtx-spc support
This commit is contained in:
parent
d6259d4535
commit
3443a2d16f
@ -57,9 +57,9 @@ namespace GameRes.Formats.Cri
|
|||||||
backend.Position = 4;
|
backend.Position = 4;
|
||||||
var lzss = new LzssStream (backend);
|
var lzss = new LzssStream (backend);
|
||||||
var input = new SeekableStream (lzss);
|
var input = new SeekableStream (lzss);
|
||||||
|
var base_name = Path.GetFileNameWithoutExtension(file.Name);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var base_name = Path.GetFileNameWithoutExtension (file.Name);
|
|
||||||
using (var spc = new XtxIndexBuilder (input, base_name))
|
using (var spc = new XtxIndexBuilder (input, base_name))
|
||||||
{
|
{
|
||||||
spc.ReadIndex (0);
|
spc.ReadIndex (0);
|
||||||
@ -71,8 +71,14 @@ namespace GameRes.Formats.Cri
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
input.Dispose();
|
//input.Dispose();
|
||||||
throw;
|
//throw;
|
||||||
|
var dir = new List<Entry>();
|
||||||
|
var entry = Create<PackedEntry>(base_name);
|
||||||
|
entry.Offset = 0;
|
||||||
|
entry.Size = (uint)input.Length;
|
||||||
|
dir.Add(entry);
|
||||||
|
return new SpcArchive(file, this, dir, input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user