mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
variation of the FPK archives.
This commit is contained in:
parent
74ea0ab92a
commit
c63ca4d5e5
@ -35,7 +35,7 @@ namespace GameRes.Formats.CandySoft
|
||||
public class FpkOpener : ArchiveFormat
|
||||
{
|
||||
public override string Tag { get { return "FPK"; } }
|
||||
public override string Description { get { return "Candy Soft resource archive"; } }
|
||||
public override string Description { get { return "Interheart/Candy Soft resource archive"; } }
|
||||
public override uint Signature { get { return 0; } }
|
||||
public override bool IsHierarchic { get { return false; } }
|
||||
public override bool CanCreate { get { return false; } }
|
||||
@ -45,23 +45,38 @@ namespace GameRes.Formats.CandySoft
|
||||
int count = file.View.ReadInt32 (0);
|
||||
if (count <= 0 || count > 0xfffff)
|
||||
return null;
|
||||
List<Entry> dir = null;
|
||||
try
|
||||
{
|
||||
dir = ReadIndex (file, count, 0x10);
|
||||
}
|
||||
catch { /* read failed, try another filename length */ }
|
||||
if (null == dir)
|
||||
dir = ReadIndex (file, count, 0x18);
|
||||
if (null == dir)
|
||||
return null;
|
||||
return new ArcFile (file, this, dir);
|
||||
}
|
||||
|
||||
private List<Entry> ReadIndex (ArcView file, int count, int name_size)
|
||||
{
|
||||
long index_offset = 4;
|
||||
uint index_size = (uint)(0x18 * count);
|
||||
uint index_size = (uint)((8 + name_size) * count);
|
||||
if (index_size > file.View.Reserve (index_offset, index_size))
|
||||
return null;
|
||||
var dir = new List<Entry> (count);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
string name = file.View.ReadString (index_offset+8, 0x10);
|
||||
string name = file.View.ReadString (index_offset+8, (uint)name_size);
|
||||
var entry = FormatCatalog.Instance.CreateEntry (name);
|
||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
||||
entry.Size = file.View.ReadUInt32 (index_offset+4);
|
||||
if (entry.Offset < index_size || !entry.CheckPlacement (file.MaxOffset))
|
||||
return null;
|
||||
dir.Add (entry);
|
||||
index_offset += 0x18;
|
||||
index_offset += 8 + name_size;
|
||||
}
|
||||
return new ArcFile (file, this, dir);
|
||||
return dir;
|
||||
}
|
||||
|
||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||
|
@ -125,6 +125,7 @@ Coμ<br/>
|
||||
Fate/stay night<br/>
|
||||
Fate/hollow ataraxia<br/>
|
||||
G-senjou no Maou<br/>
|
||||
Hime to Majin to Koi Suru Tamashii<br/>
|
||||
Damegane<br/>
|
||||
Imouto Style<br/>
|
||||
Nuki Doki!<br/>
|
||||
@ -232,7 +233,11 @@ Mainichi Shabutte Ii Desu ka?<br/>
|
||||
</td></tr>
|
||||
<tr><td>*.gr</td><td>-</td><td>No</td></tr>
|
||||
<tr class="odd"><td>*.dat</td><td><tt>SPack</tt></td><td>No</td><td>Goku-Fero</td><td>Inchuu Reiki Elenova</tr>
|
||||
<tr><td>*.fpk</td><td>-</td><td>No</td><td>Candy Soft</td><td>Jii -Nozoki no Houshuu-</td></tr>
|
||||
<tr><td>*.fpk</td><td>-</td><td>No</td><td rowspan="2">Candy Soft<br/>Interheart</td><td rowspan="2">
|
||||
Jii -Nozoki no Houshuu-<br/>
|
||||
Itazura ZERO<br>
|
||||
</td></tr>
|
||||
<tr><td>*.kg</td><td><tt>GCGK</tt></td><td>No</td></tr>
|
||||
<tr class="odd"><td>*.noa<br/>*.dat</td><td><tt>Entis\x1a</tt></td><td>No</td><td rowspan="2">Entis GLS</td><td rowspan="2">
|
||||
Alea Akaki Tsuki o Haruka ni Nozomi<br/>
|
||||
Konneko<br/>
|
||||
|
Loading…
Reference in New Issue
Block a user