(ConsoleBrowser): deserialize formats data.

This commit is contained in:
morkt 2016-10-24 19:53:28 +04:00
parent 4585f78074
commit cd5304f083

View File

@ -85,6 +85,7 @@ namespace GARbro
return;
}
}
DeserializeGameData();
foreach (var file in VFS.GetFiles (args[argn]))
{
m_arc_name = file.Name;
@ -116,6 +117,20 @@ namespace GARbro
}
}
void DeserializeGameData ()
{
string scheme_file = Path.Combine (FormatCatalog.Instance.DataDirectory, "Formats.dat");
try
{
using (var file = File.OpenRead (scheme_file))
FormatCatalog.Instance.DeserializeScheme (file);
}
catch (Exception X)
{
Console.Error.WriteLine ("Scheme deserialization failed: {0}", X.Message);
}
}
static void Usage ()
{
Console.WriteLine ("Usage: gameres [OPTIONS] ARC [ENTRIES]");