mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
perf: edit arc
This commit is contained in:
parent
dad693ca9e
commit
6efe8ad30b
@ -22,12 +22,14 @@ namespace GameRes.Formats.MAGES
|
|||||||
{
|
{
|
||||||
string filepath = Path.GetDirectoryName(filedata.Name);
|
string filepath = Path.GetDirectoryName(filedata.Name);
|
||||||
filepath = Path.Combine(filepath, "list.bin");
|
filepath = Path.Combine(filepath, "list.bin");
|
||||||
|
if (! File.Exists(filepath)) return null;
|
||||||
filelist = new ArcView(filepath);
|
filelist = new ArcView(filepath);
|
||||||
}
|
}
|
||||||
else if (filedata.Name.EndsWith("list.bin"))
|
else if (filedata.Name.EndsWith("list.bin"))
|
||||||
{
|
{
|
||||||
string filepath = Path.GetDirectoryName(filedata.Name);
|
string filepath = Path.GetDirectoryName(filedata.Name);
|
||||||
filepath = Path.Combine(filepath, "data.bin");
|
filepath = Path.Combine(filepath, "data.bin");
|
||||||
|
if (!File.Exists(filepath)) return null;
|
||||||
filelist = new ArcView(filepath);
|
filelist = new ArcView(filepath);
|
||||||
return TryOpen(filelist);
|
return TryOpen(filelist);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ namespace GameRes.Formats.NipponIchi
|
|||||||
public override ArcFile TryOpen(ArcView file)
|
public override ArcFile TryOpen(ArcView file)
|
||||||
{
|
{
|
||||||
int count = Binary.BigEndian(file.View.ReadUInt16(6));
|
int count = Binary.BigEndian(file.View.ReadUInt16(6));
|
||||||
|
if (!IsSaneCount(count))
|
||||||
|
return null;
|
||||||
long index_offset = count * 10 + 30; //actually count*10 + 28, ignored two bytes of 000C or 000B
|
long index_offset = count * 10 + 30; //actually count*10 + 28, ignored two bytes of 000C or 000B
|
||||||
var dir = new List<Entry>(count);
|
var dir = new List<Entry>(count);
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user