Compare commits
No commits in common. "12a544b6df5f638e26b5f18831d055dd8b261621" and "608bbb36d635f8f0a7c9c41e25989060e7d97eda" have entirely different histories.
12a544b6df
...
608bbb36d6
@ -170,7 +170,7 @@ namespace EscudeTools
|
|||||||
if (!Directory.Exists(output))
|
if (!Directory.Exists(output))
|
||||||
Directory.CreateDirectory(output);
|
Directory.CreateDirectory(output);
|
||||||
var lzwManifest = new List<LzwEntry>();
|
var lzwManifest = new List<LzwEntry>();
|
||||||
//string jsonPath = Path.Combine(output, "lzwManifest.json");
|
string jsonPath = Path.Combine(output, "lzwManifest.json");
|
||||||
using FileStream inputStream = new(pFile, FileMode.Open, FileAccess.Read);
|
using FileStream inputStream = new(pFile, FileMode.Open, FileAccess.Read);
|
||||||
using BinaryReader br = new(inputStream);
|
using BinaryReader br = new(inputStream);
|
||||||
foreach (Entry entry in pItem)
|
foreach (Entry entry in pItem)
|
||||||
@ -207,11 +207,11 @@ namespace EscudeTools
|
|||||||
|
|
||||||
if (lzwManifest.Count > 0)
|
if (lzwManifest.Count > 0)
|
||||||
{
|
{
|
||||||
//using (FileStream fs = File.Create(jsonPath))
|
using (FileStream fs = File.Create(jsonPath))
|
||||||
//{
|
{
|
||||||
// byte[] jsonBytes = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(lzwManifest));
|
byte[] jsonBytes = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(lzwManifest));
|
||||||
// fs.Write(jsonBytes, 0, jsonBytes.Length);
|
fs.Write(jsonBytes, 0, jsonBytes.Length);
|
||||||
//}
|
}
|
||||||
LzwDecode(lzwManifest, output);
|
LzwDecode(lzwManifest, output);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -317,9 +317,8 @@ namespace EscudeTools
|
|||||||
if (useCustomKey)
|
if (useCustomKey)
|
||||||
LoadKey(customKeyProviderPath);
|
LoadKey(customKeyProviderPath);
|
||||||
GeneratePItem(path);
|
GeneratePItem(path);
|
||||||
//if(File.Exists(Path.Combine(path, "lzwManifest.json")))
|
if(File.Exists(Path.Combine(path, "lzwManifest.json")))
|
||||||
// return false;
|
return false; //Q:为什么不支持 //A:因为我实在不想研究lzw算法,欢迎PR
|
||||||
//Q:为什么不支持LZW打包 //A:因为我实在不想研究lzw算法,欢迎PR
|
|
||||||
m_seed = isLoaded ? LoadedKey : 2210579460;
|
m_seed = isLoaded ? LoadedKey : 2210579460;
|
||||||
string outputPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileName(path) + ".bin");
|
string outputPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileName(path) + ".bin");
|
||||||
using (FileStream fs = new(outputPath, FileMode.Create))
|
using (FileStream fs = new(outputPath, FileMode.Create))
|
||||||
|
@ -328,24 +328,22 @@ namespace EscudeTools
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
////不支持script data打包,因为这几个封包,游戏强制lzw压缩读取
|
//Batch Repack ESC-ARC Package
|
||||||
////而我没写出lzw压缩代码
|
if (Directory.Exists(args[0]))// && Directory.Exists(args[1])
|
||||||
////Batch Repack ESC-ARC Package
|
{
|
||||||
//if (Directory.Exists(args[0]))// && Directory.Exists(args[1])
|
string[] directories = Directory.GetDirectories(args[0]);
|
||||||
//{
|
foreach (string directory in directories)
|
||||||
// string[] directories = Directory.GetDirectories(args[0]);
|
{
|
||||||
// foreach (string directory in directories)
|
PackManager pm = new();
|
||||||
// {
|
//string providerFilePath = Path.Combine(args[1], Path.GetFileName(directory) + ".bin");
|
||||||
// PackManager pm = new();
|
if (pm.Repack(directory, 2, true))
|
||||||
// //string providerFilePath = Path.Combine(args[1], Path.GetFileName(directory) + ".bin");
|
Console.WriteLine("Repack Package Success");
|
||||||
// if (pm.Repack(directory, 2, true))
|
else
|
||||||
// Console.WriteLine("Repack Package Success");
|
{
|
||||||
// else
|
Console.WriteLine("Repack Package Failed");
|
||||||
// {
|
}
|
||||||
// Console.WriteLine("Repack Package Failed");
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
////Batch Unpack Script(Full, Text, Mess)
|
////Batch Unpack Script(Full, Text, Mess)
|
||||||
@ -440,34 +438,34 @@ namespace EscudeTools
|
|||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//导出db_*.bin
|
////导出db_*.bin
|
||||||
if (Directory.Exists(args[0]))
|
//if (Directory.Exists(args[0]))
|
||||||
{
|
//{
|
||||||
string[] files = Directory.GetFiles(args[0], "db_*.bin");
|
// string[] files = Directory.GetFiles(args[0], "db_*.bin");
|
||||||
DatabaseManager dm = new();
|
// DatabaseManager dm = new();
|
||||||
foreach (string file in files)
|
// foreach (string file in files)
|
||||||
{
|
// {
|
||||||
if (dm.LoadDatabase(file))
|
// if (dm.LoadDatabase(file))
|
||||||
{
|
// {
|
||||||
Console.WriteLine($"Load {file} Success");
|
// Console.WriteLine($"Load {file} Success");
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Console.WriteLine($"Load {file} Failed");
|
// Console.WriteLine($"Load {file} Failed");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (dm.ExportDatabase(Path.GetDirectoryName(args[0])))
|
// if (dm.ExportDatabase(Path.GetDirectoryName(args[0])))
|
||||||
Console.WriteLine("Export Database Success");
|
// Console.WriteLine("Export Database Success");
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Console.WriteLine("Export Database Failed");
|
// Console.WriteLine("Export Database Failed");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
// if (args.Length == 0 || args.Length > 2)
|
// if (args.Length == 0 || args.Length > 2)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"EscudeTools": {
|
"EscudeTools": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"commandLineArgs": "G:\\x221.local\\lab3\\Haison\\output\\data"
|
"commandLineArgs": "G:\\x221.local\\lab3\\Haison\\output\\output"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user