Beispiel #1
0
 public EsmFile(ProxySink proxySink, string filePath, TesGame game)
     : base(proxySink, !string.IsNullOrEmpty(filePath) ? new BinaryFileReader(File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) : null, filePath, ToFormat(game), 1, 0)
 {
     //void process()
     //{
     //    var watch = new Stopwatch(); watch.Start();
     //    Core.Debug.Log($"Loading: {watch.ElapsedMilliseconds}");
     //    Process();
     //    watch.Stop();
     //}
     if (_proxySink is ProxySinkServer)
     {
         return;
     }
     if (_proxySink is ProxySinkClient)
     {
         SinkDataContains(null);
         Process();
         return;
     }
     if (filePath == null)
     {
         return;
     }
     Read();
     Process();
 }
Beispiel #2
0
 public ResFile(ProxySink proxySink, IPakFile pakFile)
 {
     _proxySink = proxySink;
     if (proxySink is ProxySinkClient)
     {
         return;
     }
     _pakFile = pakFile;
 }
Beispiel #3
0
 public RecordGroup(ProxySink proxySink, BinaryFileReader r, string filePath, GameFormat format, int recordLevel, int depth)
 {
     _proxySink  = proxySink;
     _r          = r;
     FilePath    = filePath;
     Format      = format;
     RecordLevel = recordLevel;
     Depth       = depth;
 }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BsaMultiFile" /> class.
        /// </summary>
        /// <param name="proxySink">The proxy sink.</param>
        /// <param name="filePaths">The file paths.</param>
        /// <exception cref="System.ArgumentNullException">filePaths</exception>
        /// <exception cref="ArgumentNullException">filePaths</exception>
        public BsaMultiFile(ProxySink proxySink, string[] filePaths)
        {
            _proxySink = proxySink;
            if (_proxySink is ProxySinkClient)
            {
                return;
            }
            var files = (filePaths ?? throw new ArgumentNullException(nameof(filePaths)))
                        .Where(x => Path.GetExtension(x) == ".bsa" || Path.GetExtension(x) == ".ba2");

            Packs.AddRange(files.Select(x => new BsaFile(x)));
        }
Beispiel #5
0
 public DatFile(ProxySink proxySink, string filePath, UltimaIXGame game)
     : base(proxySink, filePath)
 {
     if (_proxySink is ProxySinkServer)
     {
         return;
     }
     if (_proxySink is ProxySinkClient)
     {
         Process();
         return;
     }
     if (filePath == null)
     {
         return;
     }
 }
Beispiel #6
0
 public TesDataPack(ProxySink proxySink, string filePath, TesGame game) : base(proxySink, !string.IsNullOrEmpty(filePath) && File.Exists(filePath) ? filePath : null, game)
 {
 }
Beispiel #7
0
 public static UltimaIXGame ToUltimaIXGame(this Uri uri, Func <object> func, out ProxySink proxySink, out string[] filePaths) => ProxyUtils.ToGame <UltimaIXGame>(uri, func, out proxySink, out filePaths, "UltimaIX", (path, game) => UltimaIXFileManager.GetFilePaths(false, path, game));
 public static CryGame ToCryGame(this Uri uri, Func <object> func, out ProxySink proxySink, out string[] filePaths) => ProxyUtils.ToGame <CryGame>(uri, func, out proxySink, out filePaths, "Cry", (path, game) => CryFileManager.GetFilePaths("Data.p4k", game));
Beispiel #9
0
 public TesAssetPack(ProxySink proxySink, string[] filePaths) : base(proxySink, filePaths)
 {
     _textureManager  = new TextureManager(this);
     _materialManager = new MaterialManager(_textureManager);
     _nifManager      = new NifManager(this, _materialManager, 0);
 }
Beispiel #10
0
 public CryAssetPack(ProxySink client, IPakFile file) : base(client, file)
 {
     _textureManager  = new TextureManager(this);
     _materialManager = new MaterialManager(_textureManager);
     _cryManager      = new CryManager(this, _materialManager, 0);
 }
Beispiel #11
0
 public static UltimaGame ToUltimaGame(this Uri uri, Func <object> func, out ProxySink proxySink, out string[] filePaths) => ProxyUtils.ToGame <UltimaGame>(uri, func, out proxySink, out filePaths, "Ultima", (path, game) => new string[0]);
 public UltimaAssetPack(ProxySink client) : base(client)
 {
     _textureManager  = new TextureManager(this);
     _materialManager = new MaterialManager(_textureManager);
     _staManager      = new SifManager(this, _materialManager);
 }
 public RecordGroup(ProxySink proxySink, string filePath)
 {
     _proxySink = proxySink;
     FilePath   = filePath;
 }
        //UltimaIXManager _ultimaIXManager;

        public UltimaIXAssetPack(ProxySink client, IFlxFile file) : base(client, file)
        {
            _textureManager  = new TextureManager(this);
            _materialManager = new MaterialManager(_textureManager);
            //_ultimaIXManager = new UltimaIXManager(this, _materialManager, 0);
        }
Beispiel #15
0
 public ResFile(ProxySink proxySink) => _proxySink = proxySink;
Beispiel #16
0
 public static TesGame ToTesGame(this Uri uri, Func <object> func, out ProxySink proxySink, out string[] filePaths) => ProxyUtils.ToGame <TesGame>(uri, func, out proxySink, out filePaths, "Tes", (path, game) => TesFileManager.GetFilePaths(Path.GetExtension(path) == ".bsa" || Path.GetExtension(path) == ".ba2", path, game));