mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(InputProxyStream): generalization of input filters.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace GameRes.Formats
|
||||
}
|
||||
}
|
||||
|
||||
internal class Um3Stream : ProxyStream
|
||||
internal class Um3Stream : InputProxyStream
|
||||
{
|
||||
public Um3Stream (Stream main, bool leave_open = false)
|
||||
: base (main, leave_open)
|
||||
@@ -72,15 +72,5 @@ namespace GameRes.Formats
|
||||
b ^= 0xFF;
|
||||
return b;
|
||||
}
|
||||
|
||||
public override void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotSupportedException ("Um3Stream.Write not supported");
|
||||
}
|
||||
|
||||
public override void WriteByte (byte value)
|
||||
{
|
||||
throw new NotSupportedException ("Um3Stream.Write not supported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace GameRes.Formats.Bruns
|
||||
}
|
||||
}
|
||||
|
||||
internal class EencStream : ProxyStream
|
||||
internal class EencStream : InputProxyStream
|
||||
{
|
||||
uint m_key;
|
||||
|
||||
@@ -124,8 +124,6 @@ namespace GameRes.Formats.Bruns
|
||||
m_key = key;
|
||||
}
|
||||
|
||||
public override bool CanWrite { get { return false; } }
|
||||
|
||||
public override int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
int pos = (int)Position & 3;
|
||||
@@ -146,20 +144,5 @@ namespace GameRes.Formats.Bruns
|
||||
b ^= (byte)(m_key >> (pos << 3));
|
||||
return b;
|
||||
}
|
||||
|
||||
public override void SetLength (long length)
|
||||
{
|
||||
throw new NotSupportedException ("EencStream.SetLength method is not supported");
|
||||
}
|
||||
|
||||
public override void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotSupportedException ("EencStream.Write method is not supported");
|
||||
}
|
||||
|
||||
public override void WriteByte (byte value)
|
||||
{
|
||||
throw new NotSupportedException ("EencStream.WriteByte method is not supported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user