mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
(PsbOpener.OpenArcFile): new method.
This commit is contained in:
parent
872842d408
commit
cd2e43d61c
@ -77,30 +77,28 @@ namespace GameRes.Formats.Emote
|
||||
try
|
||||
{
|
||||
if (reader.Parse (key))
|
||||
{
|
||||
var dir = reader.GetTextures();
|
||||
if (null == dir)
|
||||
dir = reader.GetLayers();
|
||||
if (null == dir || 0 == dir.Count)
|
||||
return null;
|
||||
return new ArcFile (file, this, dir);
|
||||
}
|
||||
return OpenArcFile (reader, file);
|
||||
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 OpenArcFile (reader, file);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
ArcFile OpenArcFile (PsbReader reader, ArcView file)
|
||||
{
|
||||
var dir = reader.GetTextures();
|
||||
if (null == dir)
|
||||
dir = reader.GetLayers();
|
||||
if (null == dir || 0 == dir.Count)
|
||||
return null;
|
||||
return new ArcFile (file, this, dir);
|
||||
}
|
||||
|
||||
public override IImageDecoder OpenImage (ArcFile arc, Entry entry)
|
||||
{
|
||||
var tex = (TexEntry)entry;
|
||||
|
Loading…
Reference in New Issue
Block a user