예제 #1
0
        public static Grf FromFile(string grfFilePath, LoadingMode loadingMode = LoadingMode.Deferred)
        {
            var grf = new Grf();

            grf.Load(grfFilePath, loadingMode);
            return(grf);
        }
예제 #2
0
        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));
            }
        }
예제 #3
0
 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;
 }