From cd5304f0833b32f67978d170061d3f02f66da775 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 24 Oct 2016 19:53:28 +0400 Subject: [PATCH] (ConsoleBrowser): deserialize formats data. --- Console/ConsoleBrowser.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Console/ConsoleBrowser.cs b/Console/ConsoleBrowser.cs index 2dad3090..ea7ff279 100644 --- a/Console/ConsoleBrowser.cs +++ b/Console/ConsoleBrowser.cs @@ -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]");