Пример #1
0
        public string Pack(ref sFolder unpacked, sFile file)
        {
            System.IO.BinaryReader br = new System.IO.BinaryReader(System.IO.File.OpenRead(file.path));
            byte[] header             = br.ReadBytes(4);
            string ext  = new String(Encoding.ASCII.GetChars(header));
            uint   exti = BitConverter.ToUInt32(header, 0);

            if (ext == "LINK")
            {
                string fileOut = pluginHost.Get_TempFolder() + System.IO.Path.DirectorySeparatorChar + System.IO.Path.GetRandomFileName();
                LINK.Pack(file.path, fileOut, ref unpacked);
                return(fileOut);
            }

            return(null);
        }
Пример #2
0
        public ATDTX(IPluginHost pluginHost, int id)
        {
            InitializeComponent();
            this.pluginHost = pluginHost;;
            this.id         = id;

            imgs_           = LINK.Unpack(pluginHost.Search_File(id)).files.ToArray();
            imgs            = new string[imgs_.Length];
            numFile.Maximum = imgs_.Length - 1;
            label3.Text     = numFile.Maximum.ToString();

            palettes_ = LINK.Unpack(pluginHost.Search_File(0x1DC)).files.ToArray();
            palettes  = new string[palettes_.Length];

            numFile_ValueChanged(null, null);
        }
Пример #3
0
        public sFolder Unpack(sFile file)
        {
            System.IO.BinaryReader br = new System.IO.BinaryReader(System.IO.File.OpenRead(file.path));
            byte[] header             = br.ReadBytes(4);
            string ext  = new String(Encoding.ASCII.GetChars(header));
            uint   exti = BitConverter.ToUInt32(header, 0);

            if (ext == "LINK")
            {
                return(LINK.Unpack(file.path));
            }
            else if (exti == 0x0040E3C4 || exti == 0x0040E3BC)
            {
                return(PAC.Unpack(file.path));
            }

            return(new sFolder());
        }