示例#1
0
        public Img(Stream stream, IEnumerable <Idx.Entry> idxEntries, bool loadAllIdx)
        {
            this.stream = stream;
            Entries     = new IdxDictionary
            {
                idxEntries
            };

            if (loadAllIdx)
            {
                foreach (var fileName in InternalIdxs)
                {
                    FileOpen(fileName, entryStream =>
                    {
                        Entries.Add(Idx.Read(entryStream));
                    });
                }
            }
        }
示例#2
0
文件: IdxName.cs 项目: xorllc/OpenKh
 public static string Lookup(Idx.Entry entry) =>
 _nameDictionary.TryGetValue(IdxDictionary.GetHash(entry), out var name) ? name : null;
示例#3
0
文件: IdxName.cs 项目: xorllc/OpenKh
 public static string Lookup(uint hash32, ushort hash16) =>
 _nameDictionary.TryGetValue(IdxDictionary.GetHash(hash32, hash16), out var name) ? name : null;