|
|
@ -3,6 +3,7 @@ using System.IO; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Text; |
|
|
|
using Hack.Xenosaga.Common; |
|
|
|
using Hack.Tools.TraceLog; |
|
|
|
|
|
|
|
namespace Hack.Xenosaga.Process |
|
|
|
{ |
|
|
@ -506,28 +507,28 @@ namespace Hack.Xenosaga.Process |
|
|
|
Directory.CreateDirectory(Variables.dirUnpack); |
|
|
|
outputName = string.Format("{0}{1}{2}", Variables.dirUnpack, indexName, _listExtension); |
|
|
|
|
|
|
|
using (StreamWriter sw = new StreamWriter(outputName)) |
|
|
|
{ |
|
|
|
Functions.ManageListener(false, true, sw); |
|
|
|
Variables.traceLog.Off(typeTraceListeners.CONSOLE); |
|
|
|
Variables.traceLog.On(typeTraceListeners.FILE, outputName); |
|
|
|
|
|
|
|
bIndexNbSector = readIndex(indexName, index); |
|
|
|
index.SortBySector(); |
|
|
|
iIndexSize = bIndexNbSector * _sectorSize; |
|
|
|
bIndexNbSector = readIndex(indexName, index); |
|
|
|
index.SortBySector(); |
|
|
|
iIndexSize = bIndexNbSector * _sectorSize; |
|
|
|
|
|
|
|
foreach (pathElement entryPath in index.getEntries()) |
|
|
|
foreach (pathElement entryPath in index.getEntries()) |
|
|
|
{ |
|
|
|
if (!entryPath.IsDirectory) |
|
|
|
{ |
|
|
|
if (!entryPath.IsDirectory) |
|
|
|
{ |
|
|
|
double d = (entryPath.Position - iIndexSize) / _maxSizeFile; |
|
|
|
int id = (int)Math.Floor(d) + 1; |
|
|
|
double d = (entryPath.Position - iIndexSize) / _maxSizeFile; |
|
|
|
int id = (int)Math.Floor(d) + 1; |
|
|
|
|
|
|
|
Trace.WriteLine(string.Format("{0,-36}Sector={1,-15}SizeIn={2,-15}SizeOut={3,-15}File=xenosaga.{4:D2}", entryPath.FullPath, entryPath.Sector, entryPath.SizeIn, entryPath.SizeOut, id + numFile)); |
|
|
|
} |
|
|
|
Trace.WriteLine(string.Format("{0,-36}Sector={1,-15}SizeIn={2,-15}SizeOut={3,-15}File=xenosaga.{4:D2}", entryPath.FullPath, entryPath.Sector, entryPath.SizeIn, entryPath.SizeOut, id + numFile)); |
|
|
|
} |
|
|
|
|
|
|
|
Functions.ManageListener(true, false); |
|
|
|
} |
|
|
|
|
|
|
|
Variables.traceLog.On(typeTraceListeners.CONSOLE); |
|
|
|
Variables.traceLog.Off(typeTraceListeners.FILE, outputName); |
|
|
|
Variables.traceLog.Close(outputName); |
|
|
|
|
|
|
|
Trace.WriteLine("OK"); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|