|
@ -227,21 +227,6 @@ namespace Hack.Xenosaga.Process |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static MemoryStream compilEvt(evtClass.stFile file) |
|
|
|
|
|
{ |
|
|
|
|
|
MemoryStream ms = new MemoryStream(); |
|
|
|
|
|
using (BinaryReader br = new BinaryReader(ms)) |
|
|
|
|
|
{ |
|
|
|
|
|
JavaClass jc = new JavaClass(); |
|
|
|
|
|
|
|
|
|
|
|
jc.load(br); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ms; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static bool extractEvt(string pathName, Encoding encode) |
|
|
private static bool extractEvt(string pathName, Encoding encode) |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
@ -361,12 +346,13 @@ namespace Hack.Xenosaga.Process |
|
|
long posName = destEvt.Position; |
|
|
long posName = destEvt.Position; |
|
|
|
|
|
|
|
|
// Write filename table
|
|
|
// Write filename table
|
|
|
msName.Write(BitConverter.GetBytes(msName.Length-2), 0, 2, 0); |
|
|
|
|
|
|
|
|
msName.Write(BitConverter.GetBytes(0x2E), 0, 2, 0); |
|
|
|
|
|
//msName.Write(BitConverter.GetBytes(msName.Length-2), 0, 2, 0);
|
|
|
msName.Position = 0; |
|
|
msName.Position = 0; |
|
|
|
|
|
|
|
|
destEvt.Write(BitConverter.GetBytes(posName), 0, 4, 12); |
|
|
destEvt.Write(BitConverter.GetBytes(posName), 0, 4, 12); |
|
|
destEvt.Write(msName.ToArray(), 0, (int)msName.Length); |
|
|
destEvt.Write(msName.ToArray(), 0, (int)msName.Length); |
|
|
destEvt.Write(BitConverter.GetBytes(destEvt.Length), 0, 2, 8); |
|
|
|
|
|
|
|
|
destEvt.Write(BitConverter.GetBytes(destEvt.Length), 0, 4, 8); |
|
|
|
|
|
|
|
|
// Write index of files
|
|
|
// Write index of files
|
|
|
destEvt.Position = 20; |
|
|
destEvt.Position = 20; |
|
@ -380,6 +366,7 @@ namespace Hack.Xenosaga.Process |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Directory.CreateDirectory(Variables.dirPack); |
|
|
using (FileStream fs = new FileStream(Variables.dirPack + Path.GetFileName(pathName), FileMode.Create)) |
|
|
using (FileStream fs = new FileStream(Variables.dirPack + Path.GetFileName(pathName), FileMode.Create)) |
|
|
{ |
|
|
{ |
|
|
destEvt.Position = 0; |
|
|
destEvt.Position = 0; |
|
|