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); }
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)); }
private MpqBlockTable(MpqBlockEntry[] entries) { this.Entries = entries; }