mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(PsbOpener.OpenArcFile): new method.
This commit is contained in:
parent
872842d408
commit
cd2e43d61c
@ -77,6 +77,19 @@ namespace GameRes.Formats.Emote
|
||||
try
|
||||
{
|
||||
if (reader.Parse (key))
|
||||
return OpenArcFile (reader, file);
|
||||
if (!reader.IsEncrypted)
|
||||
break;
|
||||
}
|
||||
catch { /* ignore parse errors caused by invalid key */ }
|
||||
}
|
||||
if (reader.ParseNonEncrypted())
|
||||
return OpenArcFile (reader, file);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
ArcFile OpenArcFile (PsbReader reader, ArcView file)
|
||||
{
|
||||
var dir = reader.GetTextures();
|
||||
if (null == dir)
|
||||
@ -85,21 +98,6 @@ namespace GameRes.Formats.Emote
|
||||
return null;
|
||||
return new ArcFile (file, this, dir);
|
||||
}
|
||||
if (!reader.IsEncrypted)
|
||||
break;
|
||||
}
|
||||
catch { /* ignore parse errors caused by invalid key */ }
|
||||
}
|
||||
if (reader.ParseNonEncrypted())
|
||||
{
|
||||
var dir = reader.GetLayers();
|
||||
if (null == dir)
|
||||
return null;
|
||||
return new ArcFile (file, this, dir);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override IImageDecoder OpenImage (ArcFile arc, Entry entry)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user