mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(CGD): recognize "spiel100" images.
This commit is contained in:
parent
8dd6a2820d
commit
a6e9d6e178
@ -39,10 +39,17 @@ namespace GameRes.Formats.KApp
|
|||||||
public override string Description { get { return "KApp compressed image format"; } }
|
public override string Description { get { return "KApp compressed image format"; } }
|
||||||
public override uint Signature { get { return 0x6F6F746B; } } // 'ktool210'
|
public override uint Signature { get { return 0x6F6F746B; } } // 'ktool210'
|
||||||
|
|
||||||
|
public CgdFormat ()
|
||||||
|
{
|
||||||
|
Signatures = new uint[] { 0x6F6F746B, 0x65697073 };
|
||||||
|
}
|
||||||
|
|
||||||
public override ImageMetaData ReadMetaData (IBinaryStream file)
|
public override ImageMetaData ReadMetaData (IBinaryStream file)
|
||||||
{
|
{
|
||||||
var header = file.ReadHeader (0x18);
|
var header = file.ReadHeader (0x18);
|
||||||
if (!header.AsciiEqual ("ktool210") || header.ToInt32 (8) != 1)
|
if (header.ToInt32 (8) != 1)
|
||||||
|
return null;
|
||||||
|
if (!header.AsciiEqual ("ktool210") && !header.AsciiEqual ("spiel100"))
|
||||||
return null;
|
return null;
|
||||||
uint offset = header.ToUInt32 (0x10) & 0x7FFFFFFF;
|
uint offset = header.ToUInt32 (0x10) & 0x7FFFFFFF;
|
||||||
return CgdMetaData.FromStream (file, offset);
|
return CgdMetaData.FromStream (file, offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user