diff --git a/ArcFormats/KiriKiri/CryptAlgorithms.cs b/ArcFormats/KiriKiri/CryptAlgorithms.cs index 5305ac83..d6f4fc2a 100644 --- a/ArcFormats/KiriKiri/CryptAlgorithms.cs +++ b/ArcFormats/KiriKiri/CryptAlgorithms.cs @@ -1023,26 +1023,24 @@ namespace GameRes.Formats.KiriKiri { } - public override void Init (ArcFile arc) + public override string ReadName (BinaryReader header) { if (null == KnownNames) ReadNames(); - foreach (var entry in arc.Dir) - { - string name; - if (KnownNames.TryGetValue (entry.Name, out name)) - { - entry.Name = name; - entry.Type = FormatCatalog.Instance.GetTypeFromName (name); - } - } + var hash = base.ReadName (header); + string name; + if (null == hash || !KnownNames.TryGetValue (hash, out name)) + return hash; + if (string.IsNullOrEmpty (name)) + return null; + return name; } void ReadNames () { var dir = FormatCatalog.Instance.DataDirectory; var names_file = Path.Combine (dir, FileMapName); - var names = new Dictionary(); + var names = new Dictionary { { "$", "startup.tjs" } }; try { var hash_buf = new char[32];