IBinaryStream migration.

This commit is contained in:
morkt
2016-10-16 09:22:53 +04:00
parent d0c1d5da01
commit bb18303eb4
251 changed files with 3277 additions and 3630 deletions

View File

@@ -37,13 +37,13 @@ namespace GameRes.Formats.ScenePlayer
public override uint Signature { get { return 0; } }
public override bool CanWrite { get { return true; } }
public override SoundInput TryOpen (Stream file)
public override SoundInput TryOpen (IBinaryStream file)
{
int first = file.ReadByte();
if ((first ^ 0x21) != 0x78) // doesn't look like zlib stream
return null;
file.Position = 0;
using (var input = new XoredStream (file, 0x21, true))
using (var input = new XoredStream (file.AsStream, 0x21, true))
using (var zstream = new ZLibStream (input, CompressionMode.Decompress))
{
SoundInput sound = null;