Exemple #1
0
        public String Pack(ref sFolder unpacked, sFile file)
        {
            if (file.name.EndsWith(".pcm"))
            {
                string fileOut = pluginHost.Get_TempFile();
                PCM.Pack(fileOut, unpacked);
                return(fileOut);
            }

            if (gameCode == "BLFE")
            {
                if (file.name.ToUpper().EndsWith(".DENC"))
                {
                    string fileOut = pluginHost.Get_TempFile() + ".denc";
                    DENC.Pack(fileOut, unpacked);
                    return(fileOut);
                }
                else if (file.name.ToUpper().EndsWith(".DARC"))
                {
                    string fileOut = pluginHost.Get_TempFile() + ".darc";
                    DARC.Pack(fileOut, ref unpacked);
                    return(fileOut);
                }
            }
            return(null);
        }
Exemple #2
0
        public String Pack(ref sFolder unpacked, sFile file)
        {
            if (file.name.EndsWith(".pcm"))
            {
                string fileOut = pluginHost.Get_TempFile();
                PCM.Pack(fileOut, unpacked);
                return(fileOut);
            }

            if (file.name.EndsWith(".plz"))
            {
                string fileOut = this.pluginHost.Get_TempFile();
                PCK2.Pack(fileOut, unpacked.files);
                string compressed = this.pluginHost.Get_TempFile();
                this.pluginHost.Compress(fileOut, compressed, FormatCompress.LZ10);
                File.Delete(fileOut);
                return(compressed);
            }

            if (gameCode == "BLFE")
            {
                if (file.name.ToUpper().EndsWith(".DENC"))
                {
                    string fileOut = pluginHost.Get_TempFile() + ".denc";
                    DENC.Pack(fileOut, unpacked);
                    return(fileOut);
                }
                else if (file.name.ToUpper().EndsWith(".DARC"))
                {
                    string fileOut = pluginHost.Get_TempFile() + ".darc";
                    DARC.Pack(fileOut, ref unpacked);
                    return(fileOut);
                }
            }
            return(null);
        }