示例#1
0
        internal static unsafe MpqBlockTable FromMemory(uint* table, ushort* highTable, long tableLength, out uint fileCount)
        {
            var entries = new MpqBlockEntry[tableLength];

            fileCount = 0;

            if (highTable == null)
                for (int i = 0; i < entries.Length; i++) // Fill MpqHashTable object
                    entries[i] = new MpqBlockEntry(*table++, *table++, *table++, *table++, ref fileCount);
            else
                for (int i = 0; i < entries.Length; i++) // Fill MpqHashTable object
                    entries[i] = new MpqBlockEntry(*table++ | ((long)*highTable++ << 32), *table++, *table++, *table++, ref fileCount);

            return new MpqBlockTable(entries);
        }
示例#2
0
        internal static unsafe MpqBlockTable FromMemory(uint *table, ushort *highTable, long tableLength, out uint fileCount)
        {
            var entries = new MpqBlockEntry[tableLength];

            fileCount = 0;

            if (highTable == null)
            {
                for (int i = 0; i < entries.Length; i++)                 // Fill MpqHashTable object
                {
                    entries[i] = new MpqBlockEntry(*table++, *table++, *table++, *table++, ref fileCount);
                }
            }
            else
            {
                for (int i = 0; i < entries.Length; i++)                 // Fill MpqHashTable object
                {
                    entries[i] = new MpqBlockEntry(*table++ | ((long)*highTable++ << 32), *table++, *table++, *table++, ref fileCount);
                }
            }

            return(new MpqBlockTable(entries));
        }
示例#3
0
 private MpqBlockTable(MpqBlockEntry[] entries)
 {
     this.Entries = entries;
 }