update
This commit is contained in:
parent
a4036e89d6
commit
7a6ffec374
@ -72,8 +72,8 @@ namespace TmrHiroRepack
|
||||
else
|
||||
throw new Exception("Invalid Version");
|
||||
long offset = 0; //Index区偏移
|
||||
List<Index> indexs = new();
|
||||
string[] extensions = { ".ogg", ".grd", ".srp" }; //需要移除的文件后缀,因为这是Garbro添加的
|
||||
List<Index> indexs = [];
|
||||
string[] extensions = [".ogg", ".grd", ".srp"]; //需要移除的文件后缀,因为这是Garbro添加的
|
||||
foreach (string file in files)
|
||||
{
|
||||
Index i = new();
|
||||
@ -112,9 +112,8 @@ namespace TmrHiroRepack
|
||||
}
|
||||
//准备开写
|
||||
string outputPath = Path.Combine(Path.GetDirectoryName(folderPath), Path.GetFileName(folderPath) + ".pac");
|
||||
using (FileStream fs = new(outputPath, FileMode.Create))
|
||||
using (BinaryWriter bw = new(fs))
|
||||
{
|
||||
using FileStream fs = new(outputPath, FileMode.Create);
|
||||
using BinaryWriter bw = new(fs);
|
||||
bw.Write(count);//文件数量
|
||||
bw.Write(name_length);//文件名长度
|
||||
bw.Write(data_offset);//Data区偏移
|
||||
@ -136,12 +135,9 @@ namespace TmrHiroRepack
|
||||
}
|
||||
foreach (string file in files)
|
||||
{
|
||||
using (FileStream fs2 = new(file, FileMode.Open))
|
||||
{
|
||||
using FileStream fs2 = new(file, FileMode.Open);
|
||||
fs2.CopyTo(fs);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user