private void CreateFileDicts(RAFArchive raf, UInt32 offsetFileList, UInt32 offsetStringTable) { //The file list starts with a uint stating how many files we have var fileListCount = BitConverter.ToUInt32(m_content.SubArray((Int32)offsetFileList, 4), 0); //After the file list count, we have the actual data. offsetFileList += 4; for (var currentOffset = offsetFileList; currentOffset < offsetFileList + 16 * fileListCount; currentOffset += 16) { var entry = new RAFFileListEntry(raf, ref raf.m_content, currentOffset, offsetStringTable); raf.m_fileDictFull.Add(entry.FileName.ToLower(), entry); var fi = new FileInfo(entry.FileName); if (!raf.m_fileDictShort.ContainsKey(fi.Name.ToLower())) { raf.m_fileDictShort.Add(fi.Name.ToLower(), new List <RAFFileListEntry> { entry }); } else { raf.m_fileDictShort[fi.Name.ToLower()].Add(entry); } } }
private RAFFileListEntry CreateFileEntry(string rafPath, UInt32 offset, UInt32 fileSize) { var result = new RAFFileListEntry(this, rafPath, offset, fileSize); m_fileDictFull.Add(result.FileName, result); var fi = new FileInfo(result.FileName); if (!m_fileDictShort.ContainsKey(fi.Name)) { m_fileDictShort.Add(fi.Name, new List <RAFFileListEntry> { result }); } else { m_fileDictShort[fi.Name].Add(result); } return(result); }
private void CreateFileDicts(RAFArchive raf, UInt32 offsetFileList, UInt32 offsetStringTable) { //The file list starts with a uint stating how many files we have var fileListCount = BitConverter.ToUInt32(m_content.SubArray((Int32) offsetFileList, 4), 0); //After the file list count, we have the actual data. offsetFileList += 4; for (var currentOffset = offsetFileList; currentOffset < offsetFileList + 16*fileListCount; currentOffset += 16) { var entry = new RAFFileListEntry(raf, ref raf.m_content, currentOffset, offsetStringTable); raf.m_fileDictFull.Add(entry.FileName.ToLower(), entry); var fi = new FileInfo(entry.FileName); if (!raf.m_fileDictShort.ContainsKey(fi.Name.ToLower())) raf.m_fileDictShort.Add(fi.Name.ToLower(), new List<RAFFileListEntry> {entry}); else raf.m_fileDictShort[fi.Name.ToLower()].Add(entry); } }
private RAFFileListEntry CreateFileEntry(string rafPath, UInt32 offset, UInt32 fileSize) { var result = new RAFFileListEntry(this, rafPath, offset, fileSize); m_fileDictFull.Add(result.FileName, result); var fi = new FileInfo(result.FileName); if (!m_fileDictShort.ContainsKey(fi.Name)) m_fileDictShort.Add(fi.Name, new List<RAFFileListEntry> {result}); else m_fileDictShort[fi.Name].Add(result); return result; }
public AIMesh(RAFFileListEntry file) : this(file.GetContent()) { }