public static Grf FromFile(string grfFilePath, LoadingMode loadingMode = LoadingMode.Deferred) { var grf = new Grf(); grf.Load(grfFilePath, loadingMode); return(grf); }
private void Load(string iniFilePath, string sectionName, LoadingMode loadingMode) { var dataIni = new GrfIni(iniFilePath); var directory = Path.GetDirectoryName(iniFilePath); var grfFiles = dataIni.Values(sectionName); foreach (var grfFile in grfFiles) { var filePath = Path.Combine(directory, grfFile); _grfs.Add(Grf.FromFile(filePath, loadingMode)); } }
public GrfEntry(string path, uint fileOffset, uint compressedSize, uint compressedFileSizeAligned, uint uncompressedSize, FileFlag flags, Grf owner) { Path = path; Header = new GrfEntryHeader { FileOffset = fileOffset, CompressedSize = compressedSize, CompressedSizeAligned = compressedFileSizeAligned, UncompressedSize = uncompressedSize, Flags = flags }; _owner = owner; }