mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +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 bool CanWrite { get { return true; } }
|
||||
|
||||
public MbImageFormat ()
|
||||
{
|
||||
Extensions = new[] { "bmp", "gra" };
|
||||
}
|
||||
|
||||
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
||||
{
|
||||
int c1 = stream.ReadByte();
|
||||
int c2 = stream.ReadByte();
|
||||
if ('M' != c1 || ('B' != c2 && 'C' != c2))
|
||||
return null;
|
||||
switch (c1)
|
||||
{
|
||||
case 'M':
|
||||
if ('B' != c2 && 'C' != c2)
|
||||
return null;
|
||||
break;
|
||||
case 'C':
|
||||
if ('L' != c2)
|
||||
return null;
|
||||
break;
|
||||
}
|
||||
using (var bmp = OpenAsBitmap (stream))
|
||||
return Bmp.ReadMetaData (bmp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user