4 Commits

2 changed files with 5 additions and 18 deletions
Unified View
  1. +1
    -1
      Hack.Xenosaga/Process/JavaClass.cs
  2. +4
    -17
      Hack.Xenosaga/Process/Scripts.cs

+ 1
- 1
Hack.Xenosaga/Process/JavaClass.cs View File

@ -529,7 +529,7 @@ namespace Hack.Xenosaga.Process
foreach (KeyValuePair<int, stAttribut> attribut in field.Value.attributes) foreach (KeyValuePair<int, stAttribut> attribut in field.Value.attributes)
{ {
bw.Write(IntToByteArrayBE(attribut.Value.attribute_name_index, 2), 0, 2); bw.Write(IntToByteArrayBE(attribut.Value.attribute_name_index, 2), 0, 2);
bw.Write(IntToByteArrayBE((int)attribut.Value.attribute_length, 2), 0, 2);
bw.Write(IntToByteArrayBE((int)attribut.Value.attribute_length, 4), 0, 4);
bw.Write(attribut.Value.info); bw.Write(attribut.Value.info);
} }
} }


+ 4
- 17
Hack.Xenosaga/Process/Scripts.cs View File

@ -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;


Loading…
Cancel
Save