diff --git a/ArcFormats/elf/ArcAi5Win.cs b/ArcFormats/elf/ArcAi5Win.cs index a61eb3b6..eeec60ea 100644 --- a/ArcFormats/elf/ArcAi5Win.cs +++ b/ArcFormats/elf/ArcAi5Win.cs @@ -41,7 +41,7 @@ namespace GameRes.Formats.Elf } [Export(typeof(ArchiveFormat))] - public class ArcOpener : ArchiveFormat + public class ArcAI5Opener : ArchiveFormat { public override string Tag { get { return "ARC/AI5WIN"; } } 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 } }, }; - public ArcOpener () + public ArcAI5Opener () { Extensions = new string[] { "arc" }; } @@ -62,7 +62,7 @@ namespace GameRes.Formats.Elf public override ArcFile TryOpen (ArcView file) { int count = file.View.ReadInt32 (0); - if (count <= 0 || count > 0xfffff) + if (!IsSaneCount (count)) return null; long index_offset = 4; 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(); + 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 (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); + } + } } diff --git a/supported.html b/supported.html index 1db78a50..cc37cbc3 100644 --- a/supported.html +++ b/supported.html @@ -32,6 +32,7 @@ Anata no Osanazuma
Ecchi na Bunny-san wa Kirai?
Kana ~Imouto~
Kohitsuji-tachi no Rakuen
+Make Love Junkies
Natsu no Hitoshizuku
Private Nurse
Sensei 2
@@ -68,6 +69,7 @@ Okaa-san ga Ippai!
*.pakHyPackYesKogadoSymphonic Rain *+*.lst-NoNexton LikeC Moon.
+Ryoujoku Famiresu Choukyou Menu
Ryoujoku Idol Mesu Dorei
Yakuchu!
@@ -271,6 +273,7 @@ Itazura ZERO
*.kgGCGKNo *.noa
*.datEntis\x1aNoEntis GLS Alea Akaki Tsuki o Haruka ni Nozomi
+Iroha ~Aki no Yuuhi ni Kagefumi o~
Konneko
Natsu no Ame
Santaful☆Summer
@@ -308,6 +311,7 @@ Maid no Yakata ~Zetsubou Hen~
*.pakCHERRY PACK 2.0
-NoCherry Double
Kimon Youitan
+Unbalance
*.lib
*.datLIB
LIBPNoMalie Angel Crown
@@ -318,6 +322,7 @@ Zettai Meikyuu Grimm
*.mgfMalieGFYes *.arc-NoAI5WIN +Ai Shimai Tsubomi...
Jokei Kazoku ~Inbou~
*.gccG24n
G24m
R24n
R24mNo