mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55: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
|
try
|
||||||
{
|
{
|
||||||
if (reader.Parse (key))
|
if (reader.Parse (key))
|
||||||
{
|
return OpenArcFile (reader, 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);
|
|
||||||
}
|
|
||||||
if (!reader.IsEncrypted)
|
if (!reader.IsEncrypted)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch { /* ignore parse errors caused by invalid key */ }
|
catch { /* ignore parse errors caused by invalid key */ }
|
||||||
}
|
}
|
||||||
if (reader.ParseNonEncrypted())
|
if (reader.ParseNonEncrypted())
|
||||||
{
|
return OpenArcFile (reader, file);
|
||||||
var dir = reader.GetLayers();
|
|
||||||
if (null == dir)
|
|
||||||
return null;
|
|
||||||
return new ArcFile (file, this, dir);
|
|
||||||
}
|
|
||||||
return null;
|
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)
|
public override IImageDecoder OpenImage (ArcFile arc, Entry entry)
|
||||||
{
|
{
|
||||||
var tex = (TexEntry)entry;
|
var tex = (TexEntry)entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user