Beispiel #1
0
 private void loadTex(int texIndex)
 {
     pcc             = new KFreonLib.PCCObjects.ME3PCCObject(textures[texIndex].allPccs[0]);
     tex2D           = new SaltTexture2D(pcc, textures[texIndex].pccExpIdx, Path.GetDirectoryName(pathCooked));
     tex2D.pccExpIdx = textures[texIndex].pccExpIdx;
     tex2D.allPccs   = textures[texIndex].allPccs;
 }
Beispiel #2
0
        private void bgw1_DoWork(object sender, DoWorkEventArgs e)
        {
            bgw1.ReportProgress(0);

            pcc = new KFreonLib.PCCObjects.ME3PCCObject(tex2D.allPccs[0]);
            KFreonLib.PCCObjects.ME3ExportEntry expEntry = pcc.Exports[tex2D.pccExpIdx];
            expEntry.SetData(tex2D.ToArray(expEntry.DataOffset, pcc));
            pcc.Exports[tex2D.pccExpIdx] = expEntry;
            pcc.saveToFile(tex2D.allPccs[0]);

            #region Old code

            /*
             * File.Copy(pcc.pccFileName, exec + "temp.pcc", true);
             *
             * long test = (new FileInfo(exec + "temp.pcc")).Length;
             * if (pcc.bCompressed)
             * {
             *  Form2 decompress = new Form2();
             *  decompress.Decompress(exec + "temp.pcc");
             *  decompress.Close();
             *  if (test == (new FileInfo(exec + "temp.pcc")).Length)
             *      pcc.saveToFile(exec + "temp.pcc");
             * }
             * pcc = new Texplorer.PCCObject(exec + "temp.pcc");
             * pcc.Names.Add("TEXTUREGROUP_Shadowmap");
             * Unreal.PCCObject.ExportEntry exp = pcc.Exports[tex2D.pccExpIdx];
             * exp.Data = tex2D.ToArray(exp.DataOffset, pcc);
             * pcc.Exports[tex2D.pccExpIdx] = exp;
             * pcc.altSaveToFile(exec + "temp2.pcc", true);
             * try
             * {
             *  Unreal.PCCObject temp = new Unreal.PCCObject(exec + "temp2.pcc");
             * }
             * catch
             * {
             *  pcc.saveToFile(exec + "temp2.pcc");
             * }
             * File.Copy(exec + "temp2.pcc", tex2D.allPccs[0], true);
             * bgw1.ReportProgress(1);
             *
             * for (int i = 0; i < tex2D.allPccs.Count; i++)
             * {
             *  throw new NotImplementedException("Not done yet");
             * }
             */
            #endregion
            tocUpdate();
        }
Beispiel #3
0
        private void bgw1_DoWork(object sender, DoWorkEventArgs e)
        {
            bgw1.ReportProgress(0);

            pcc = new KFreonLib.PCCObjects.ME3PCCObject(tex2D.allPccs[0]);
            KFreonLib.PCCObjects.ME3ExportEntry expEntry = pcc.Exports[tex2D.pccExpIdx];
            expEntry.SetData(tex2D.ToArray(expEntry.DataOffset, pcc));
            pcc.Exports[tex2D.pccExpIdx] = expEntry;
            pcc.saveToFile(tex2D.allPccs[0]);

            #region Old code
            /*
            File.Copy(pcc.pccFileName, exec + "temp.pcc", true);

            long test = (new FileInfo(exec + "temp.pcc")).Length;
            if (pcc.bCompressed)
            {
                Form2 decompress = new Form2();
                decompress.Decompress(exec + "temp.pcc");
                decompress.Close();
                if (test == (new FileInfo(exec + "temp.pcc")).Length)
                    pcc.saveToFile(exec + "temp.pcc");
            }
            pcc = new Texplorer.PCCObject(exec + "temp.pcc");
            pcc.Names.Add("TEXTUREGROUP_Shadowmap");
            Unreal.PCCObject.ExportEntry exp = pcc.Exports[tex2D.pccExpIdx];
            exp.Data = tex2D.ToArray(exp.DataOffset, pcc);
            pcc.Exports[tex2D.pccExpIdx] = exp;
            pcc.altSaveToFile(exec + "temp2.pcc", true);
            try
            {
                Unreal.PCCObject temp = new Unreal.PCCObject(exec + "temp2.pcc");
            }
            catch
            {
                pcc.saveToFile(exec + "temp2.pcc");
            }
            File.Copy(exec + "temp2.pcc", tex2D.allPccs[0], true);
            bgw1.ReportProgress(1);

            for (int i = 0; i < tex2D.allPccs.Count; i++)
            {
                throw new NotImplementedException("Not done yet");
            }
            */
            #endregion
            tocUpdate();
        }
Beispiel #4
0
 private void loadTex(int texIndex)
 {
     pcc = new KFreonLib.PCCObjects.ME3PCCObject(textures[texIndex].allPccs[0]);
     tex2D = new SaltTexture2D(pcc, textures[texIndex].pccExpIdx, Path.GetDirectoryName(pathCooked));
     tex2D.pccExpIdx = textures[texIndex].pccExpIdx;
     tex2D.allPccs = textures[texIndex].allPccs;
 }