mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(MB): recognize 'CL' signatures as well.
This commit is contained in:
parent
9c36a800a3
commit
11610a7f9c
@ -36,12 +36,26 @@ namespace GameRes.Formats
|
|||||||
public override uint Signature { get { return 0; } }
|
public override uint Signature { get { return 0; } }
|
||||||
public override bool CanWrite { get { return true; } }
|
public override bool CanWrite { get { return true; } }
|
||||||
|
|
||||||
|
public MbImageFormat ()
|
||||||
|
{
|
||||||
|
Extensions = new[] { "bmp", "gra" };
|
||||||
|
}
|
||||||
|
|
||||||
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
||||||
{
|
{
|
||||||
int c1 = stream.ReadByte();
|
int c1 = stream.ReadByte();
|
||||||
int c2 = stream.ReadByte();
|
int c2 = stream.ReadByte();
|
||||||
if ('M' != c1 || ('B' != c2 && 'C' != c2))
|
switch (c1)
|
||||||
return null;
|
{
|
||||||
|
case 'M':
|
||||||
|
if ('B' != c2 && 'C' != c2)
|
||||||
|
return null;
|
||||||
|
break;
|
||||||
|
case 'C':
|
||||||
|
if ('L' != c2)
|
||||||
|
return null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
using (var bmp = OpenAsBitmap (stream))
|
using (var bmp = OpenAsBitmap (stream))
|
||||||
return Bmp.ReadMetaData (bmp);
|
return Bmp.ReadMetaData (bmp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user