public sFolder Unpack(sFile file) { if (file.name.ToUpper().EndsWith(".PLZ")) { return(PCK2.Read(file.path, file.id, pluginHost)); } else if (file.name.ToUpper().EndsWith(".PCM")) { return(PCM.Unpack(file.path)); } else if (file.name.ToUpper().EndsWith(".DARC")) { return(DARC.Unpack(file.path, file.name)); } else if (file.name.ToUpper().EndsWith(".DENC")) { return(DENC.Unpack(file.path, file.name, pluginHost)); } else if (file.name.ToUpper().EndsWith(".ARCHIVE")) { return(LAYTON4.Unpack_ARCHIVE(file.path, file.name)); } return(new sFolder()); }
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); }
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); }