mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
implemented variation of YOX archives.
This commit is contained in:
parent
f990fbb55e
commit
7aa279eb3a
@ -23,6 +23,7 @@
|
||||
// IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
@ -53,15 +54,25 @@ namespace GameRes.Formats.Yox
|
||||
return null;
|
||||
|
||||
var dir = new List<Entry> (count);
|
||||
Func<uint, bool> ReadIndex = entry_size => {
|
||||
uint current_offset = index_offset;
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
var entry = new PackedEntry { Name = i.ToString ("D5") };
|
||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
||||
entry.Size = file.View.ReadUInt32 (index_offset+4);
|
||||
if (!entry.CheckPlacement (file.MaxOffset))
|
||||
return null;
|
||||
entry.Offset = file.View.ReadUInt32 (current_offset);
|
||||
entry.Size = file.View.ReadUInt32 (current_offset+4);
|
||||
if (0 == entry.Size || !entry.CheckPlacement (file.MaxOffset))
|
||||
return false;
|
||||
dir.Add (entry);
|
||||
index_offset += 8;
|
||||
current_offset += entry_size;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
if (!ReadIndex (8))
|
||||
{
|
||||
dir.Clear();
|
||||
if (!ReadIndex (0x10))
|
||||
return null;
|
||||
}
|
||||
using (var stream = file.CreateStream())
|
||||
DetectFileTypes (stream, dir);
|
||||
|
@ -1064,6 +1064,7 @@ Boku no Te no Naka no Rakuen<br/>
|
||||
<tr><td>*.fcb</td><td><tt>fcb1</tt></td><td>No</td></tr>
|
||||
<tr class="odd"><td>*.dat</td><td><tt>YOX</tt></td><td>No</td><td>Shelf</td><td>
|
||||
Kagiroi ~Shaku Kei~<br/>
|
||||
L.i.n.k.<br/>
|
||||
</td></tr>
|
||||
<tr><td>*.lac</td><td><tt>LAC</tt></td><td>No</td><td rowspan="5">Leaf</td><td rowspan="5">
|
||||
ToHeart2 AnotherDays<br/>
|
||||
|
Loading…
Reference in New Issue
Block a user