variation of Silky's ARC archives.

This commit is contained in:
morkt 2015-10-12 06:53:14 +04:00
parent d8c9d84902
commit 42fdf330ee
2 changed files with 51 additions and 3 deletions

View File

@ -41,7 +41,7 @@ namespace GameRes.Formats.Elf
} }
[Export(typeof(ArchiveFormat))] [Export(typeof(ArchiveFormat))]
public class ArcOpener : ArchiveFormat public class ArcAI5Opener : ArchiveFormat
{ {
public override string Tag { get { return "ARC/AI5WIN"; } } public override string Tag { get { return "ARC/AI5WIN"; } }
public override string Description { get { return "AI5WIN engine resource archive"; } } public override string Description { get { return "AI5WIN engine resource archive"; } }
@ -54,7 +54,7 @@ namespace GameRes.Formats.Elf
{ NameLength = 0x1E, NameKey = 0x73, SizeKey = 0xAF5789BC, OffsetKey = 0x59FACB45 } }, { NameLength = 0x1E, NameKey = 0x73, SizeKey = 0xAF5789BC, OffsetKey = 0x59FACB45 } },
}; };
public ArcOpener () public ArcAI5Opener ()
{ {
Extensions = new string[] { "arc" }; Extensions = new string[] { "arc" };
} }
@ -62,7 +62,7 @@ namespace GameRes.Formats.Elf
public override ArcFile TryOpen (ArcView file) public override ArcFile TryOpen (ArcView file)
{ {
int count = file.View.ReadInt32 (0); int count = file.View.ReadInt32 (0);
if (count <= 0 || count > 0xfffff) if (!IsSaneCount (count))
return null; return null;
long index_offset = 4; long index_offset = 4;
var scheme = KnownSchemes.First().Value; var scheme = KnownSchemes.First().Value;
@ -165,4 +165,47 @@ namespace GameRes.Formats.Elf
} }
*/ */
} }
[Export(typeof(ArchiveFormat))]
public class ArcOpener : ArchiveFormat
{
public override string Tag { get { return "ARC/SILKY'S"; } }
public override string Description { get { return "Silky's AI resource archive"; } }
public override uint Signature { get { return 0; } }
public override bool IsHierarchic { get { return false; } }
public override bool CanCreate { get { return false; } }
public ArcOpener ()
{
Extensions = new string[] { "arc" };
}
public override ArcFile TryOpen (ArcView file)
{
int count = file.View.ReadInt32 (0);
if (!IsSaneCount (count))
return null;
long index_offset = 4;
const int name_length = 0x20;
uint index_size = (uint)(count * (name_length + 8));
if (index_size > file.View.Reserve (index_offset, index_size))
return null;
var dir = new List<Entry>();
for (int i = 0; i < count; ++i)
{
string name = file.View.ReadString (index_offset, (uint)name_length);
if (0 == name.Length)
return null;
index_offset += name_length;
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = file.View.ReadUInt32 (index_offset);
entry.Size = file.View.ReadUInt32 (index_offset+4);
if (entry.Offset < index_size+4 || !entry.CheckPlacement (file.MaxOffset))
return null;
dir.Add (entry);
index_offset += 8;
}
return new ArcFile (file, this, dir);
}
}
} }

View File

@ -32,6 +32,7 @@ Anata no Osanazuma<br/>
Ecchi na Bunny-san wa Kirai?<br/> Ecchi na Bunny-san wa Kirai?<br/>
Kana ~Imouto~<br/> Kana ~Imouto~<br/>
Kohitsuji-tachi no Rakuen<br/> Kohitsuji-tachi no Rakuen<br/>
Make Love Junkies<br/>
Natsu no Hitoshizuku<br/> Natsu no Hitoshizuku<br/>
Private Nurse<br/> Private Nurse<br/>
Sensei 2<br/> Sensei 2<br/>
@ -68,6 +69,7 @@ Okaa-san ga Ippai!<br/>
<tr class="odd"><td>*.pak</td><td><tt>HyPack</tt></td><td>Yes</td><td>Kogado</td><td>Symphonic Rain</td></tr> <tr class="odd"><td>*.pak</td><td><tt>HyPack</tt></td><td>Yes</td><td>Kogado</td><td>Symphonic Rain</td></tr>
<tr><td>*+*.lst</td><td>-</td><td>No</td><td rowspan="2">Nexton LikeC</td><td rowspan="2"> <tr><td>*+*.lst</td><td>-</td><td>No</td><td rowspan="2">Nexton LikeC</td><td rowspan="2">
Moon.<br/> Moon.<br/>
Ryoujoku Famiresu Choukyou Menu<br/>
Ryoujoku Idol Mesu Dorei<br/> Ryoujoku Idol Mesu Dorei<br/>
Yakuchu!<br/> Yakuchu!<br/>
</td></tr> </td></tr>
@ -271,6 +273,7 @@ Itazura ZERO<br>
<tr><td>*.kg</td><td><tt>GCGK</tt></td><td>No</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"> <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/> Alea Akaki Tsuki o Haruka ni Nozomi<br/>
Iroha ~Aki no Yuuhi ni Kagefumi o~<br/>
Konneko<br/> Konneko<br/>
Natsu no Ame<br/> Natsu no Ame<br/>
Santaful☆Summer<br/> Santaful☆Summer<br/>
@ -308,6 +311,7 @@ Maid no Yakata ~Zetsubou Hen~<br/>
<tr><td>*.pak</td><td><tt>CHERRY PACK 2.0</tt><br/>-</td><td>No</td><td>Cherry</td><td> <tr><td>*.pak</td><td><tt>CHERRY PACK 2.0</tt><br/>-</td><td>No</td><td>Cherry</td><td>
Double<br/> Double<br/>
Kimon Youitan<br/> Kimon Youitan<br/>
Unbalance<br/>
</td></tr> </td></tr>
<tr class="odd"><td>*.lib<br/>*.dat</td><td><tt>LIB</tt><br/><tt>LIBP</tt></td><td>No</td><td rowspan="2">Malie</td><td rowspan="2"> <tr class="odd"><td>*.lib<br/>*.dat</td><td><tt>LIB</tt><br/><tt>LIBP</tt></td><td>No</td><td rowspan="2">Malie</td><td rowspan="2">
Angel Crown<br/> Angel Crown<br/>
@ -318,6 +322,7 @@ Zettai Meikyuu Grimm<br/>
</td></tr> </td></tr>
<tr class="odd"><td>*.mgf</td><td><tt>MalieGF</tt></td><td>Yes</td></tr> <tr class="odd"><td>*.mgf</td><td><tt>MalieGF</tt></td><td>Yes</td></tr>
<tr><td>*.arc</td><td>-</td><td>No</td><td rowspan="2">AI5WIN</td><td rowspan="2"> <tr><td>*.arc</td><td>-</td><td>No</td><td rowspan="2">AI5WIN</td><td rowspan="2">
Ai Shimai Tsubomi...<br/>
Jokei Kazoku ~Inbou~<br/> Jokei Kazoku ~Inbou~<br/>
</td></tr> </td></tr>
<tr><td>*.gcc</td><td><tt>G24n</tt><br/><tt>G24m</tt><br/><tt>R24n</tt><br/><tt>R24m</tt></td><td>No</td></tr> <tr><td>*.gcc</td><td><tt>G24n</tt><br/><tt>G24m</tt><br/><tt>R24n</tt><br/><tt>R24m</tt></td><td>No</td></tr>