mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 12:24:12 +08:00
(DatOpener.OpenEntry): use LzssStream.
(GsScriptFormat): stub class that provides detection of SCW scripts.
This commit is contained in:
parent
d08f6249c2
commit
ed5873b9be
@ -157,15 +157,32 @@ namespace GameRes.Formats.Gs
|
|||||||
if (0 == entry.Size)
|
if (0 == entry.Size)
|
||||||
return Stream.Null;
|
return Stream.Null;
|
||||||
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||||
var packed_entry = entry as PackedEntry;
|
if (entry is PackedEntry)
|
||||||
if (null == packed_entry)
|
return new LzssStream (input);
|
||||||
return input;
|
return input;
|
||||||
using (input)
|
}
|
||||||
using (var reader = new LzssReader (input, (int)packed_entry.Size, (int)packed_entry.UnpackedSize))
|
}
|
||||||
{
|
|
||||||
reader.Unpack();
|
[Export(typeof(ScriptFormat))]
|
||||||
return new MemoryStream (reader.Data, false);
|
public class GsScriptFormat : ScriptFormat
|
||||||
}
|
{
|
||||||
|
public override string Tag { get { return "SCW"; } }
|
||||||
|
public override string Description { get { return "GsWin script file"; } }
|
||||||
|
public override uint Signature { get { return 0x20574353; } } // 'SCW '
|
||||||
|
|
||||||
|
public GsScriptFormat ()
|
||||||
|
{
|
||||||
|
Signatures = new uint[] { 0x20574353, 0x35776353, 0x34776353 };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ScriptData Read (string name, Stream file)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write (Stream file, ScriptData script)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user