public static FtexsFileMipMap ReadFtexsFileMipMap( Stream inputStream, short chunkCount, int baseOffset, int fileSize) { FtexsFileMipMap result = new FtexsFileMipMap(); result.Read(inputStream, chunkCount, baseOffset, fileSize); return(result); }
public void Read( Stream inputStream, short chunkCount, int baseOffset, int fileSize) { FtexsFileMipMap mipMap = FtexsFileMipMap.ReadFtexsFileMipMap( inputStream, chunkCount, baseOffset, fileSize); AddMipMap(mipMap); }
public static FtexsFileMipMap ReadFtexsFileMipMap(Stream inputStream, short chunkCount) { FtexsFileMipMap result = new FtexsFileMipMap(); result.Read(inputStream, chunkCount); return result; }
public static FtexsFileMipMap ReadFtexsFileMipMap(Stream inputStream, short chunkCount, bool flipEndian = false) { FtexsFileMipMap result = new FtexsFileMipMap(); result.Read(inputStream, chunkCount, flipEndian); return result; }
public void AddMipMap(FtexsFileMipMap mipMap) { _mipMaps.Add(mipMap); }
private static List<FtexsFile> GetFtexsFiles(List<FtexFileMipMapInfo> mipMapInfos, List<byte[]> mipMapDatas) { Dictionary<byte, FtexsFile> ftexsFiles = new Dictionary<byte, FtexsFile>(); foreach (var mipMapInfo in mipMapInfos) { if (ftexsFiles.ContainsKey(mipMapInfo.FtexsFileNumber) == false) { FtexsFile ftexsFile = new FtexsFile { FileNumber = mipMapInfo.FtexsFileNumber }; ftexsFiles.Add(mipMapInfo.FtexsFileNumber, ftexsFile); } } for (int i = 0; i < mipMapInfos.Count; i++) { FtexFileMipMapInfo mipMapInfo = mipMapInfos[i]; FtexsFile ftexsFile = ftexsFiles[mipMapInfo.FtexsFileNumber]; byte[] mipMapData = mipMapDatas[i]; FtexsFileMipMap ftexsFileMipMap = new FtexsFileMipMap(); List<FtexsFileChunk> chunks = GetFtexsChunks(mipMapInfo, mipMapData); ftexsFileMipMap.AddChunks(chunks); ftexsFile.AddMipMap(ftexsFileMipMap); } return ftexsFiles.Values.ToList(); }