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.
|
// IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.Composition;
|
using System.ComponentModel.Composition;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -53,15 +54,25 @@ namespace GameRes.Formats.Yox
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
var dir = new List<Entry> (count);
|
var dir = new List<Entry> (count);
|
||||||
for (int i = 0; i < count; ++i)
|
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 (current_offset);
|
||||||
|
entry.Size = file.View.ReadUInt32 (current_offset+4);
|
||||||
|
if (0 == entry.Size || !entry.CheckPlacement (file.MaxOffset))
|
||||||
|
return false;
|
||||||
|
dir.Add (entry);
|
||||||
|
current_offset += entry_size;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
if (!ReadIndex (8))
|
||||||
{
|
{
|
||||||
var entry = new PackedEntry { Name = i.ToString ("D5") };
|
dir.Clear();
|
||||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
if (!ReadIndex (0x10))
|
||||||
entry.Size = file.View.ReadUInt32 (index_offset+4);
|
|
||||||
if (!entry.CheckPlacement (file.MaxOffset))
|
|
||||||
return null;
|
return null;
|
||||||
dir.Add (entry);
|
|
||||||
index_offset += 8;
|
|
||||||
}
|
}
|
||||||
using (var stream = file.CreateStream())
|
using (var stream = file.CreateStream())
|
||||||
DetectFileTypes (stream, dir);
|
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><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>
|
<tr class="odd"><td>*.dat</td><td><tt>YOX</tt></td><td>No</td><td>Shelf</td><td>
|
||||||
Kagiroi ~Shaku Kei~<br/>
|
Kagiroi ~Shaku Kei~<br/>
|
||||||
|
L.i.n.k.<br/>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>*.lac</td><td><tt>LAC</tt></td><td>No</td><td rowspan="5">Leaf</td><td rowspan="5">
|
<tr><td>*.lac</td><td><tt>LAC</tt></td><td>No</td><td rowspan="5">Leaf</td><td rowspan="5">
|
||||||
ToHeart2 AnotherDays<br/>
|
ToHeart2 AnotherDays<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user