mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
added game title lookup facility.
This commit is contained in:
@@ -166,8 +166,8 @@ namespace GameRes.Formats.Cyberworks
|
||||
return null;
|
||||
if (!has_images)
|
||||
return new ArcFile (file, this, dir);
|
||||
var options = Query<BellOptions> (arcStrings.ArcEncryptedNotice);
|
||||
return new BellArchive (file, this, dir, options.Scheme);
|
||||
var scheme = QueryScheme (file.Name);
|
||||
return new BellArchive (file, this, dir, scheme);
|
||||
}
|
||||
|
||||
byte[] ReadToc (string toc_name)
|
||||
@@ -275,6 +275,15 @@ namespace GameRes.Formats.Cyberworks
|
||||
return v;
|
||||
}
|
||||
|
||||
AImageScheme QueryScheme (string arc_name)
|
||||
{
|
||||
var title = FormatCatalog.Instance.LookupGame (arc_name);
|
||||
if (!string.IsNullOrEmpty (title) && KnownSchemes.ContainsKey (title))
|
||||
return KnownSchemes[title];
|
||||
var options = Query<BellOptions> (arcStrings.ArcEncryptedNotice);
|
||||
return options.Scheme;
|
||||
}
|
||||
|
||||
public override ResourceOptions GetDefaultOptions ()
|
||||
{
|
||||
return new BellOptions { Scheme = GetScheme (Settings.Default.BELLTitle) };
|
||||
|
||||
Reference in New Issue
Block a user