From 5e55256d8ec6c4813c966525d8d11d83d3b7a921 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 22 Nov 2015 06:27:09 +0400 Subject: [PATCH] implemented "CHERRY PACK 3.0" archives. --- ArcFormats/Cherry/ArcCherry.cs | 8 ++++++-- supported.html | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ArcFormats/Cherry/ArcCherry.cs b/ArcFormats/Cherry/ArcCherry.cs index 2c4e0f31..1f014820 100644 --- a/ArcFormats/Cherry/ArcCherry.cs +++ b/ArcFormats/Cherry/ArcCherry.cs @@ -138,13 +138,17 @@ namespace GameRes.Formats.Cherry public override ArcFile TryOpen (ArcView file) { - if (!file.View.AsciiEqual (0, "CHERRY PACK 2.0\0")) + if (!file.View.AsciiEqual (0, "CHERRY PACK 2.0\0") && + !file.View.AsciiEqual (0, "CHERRY PACK 3.0\0")) return null; + int version = file.View.ReadByte (0xC) - '0'; bool is_compressed = file.View.ReadInt32 (0x10) != 0; int count = file.View.ReadInt32 (0x14); long base_offset = file.View.ReadUInt32 (0x18); bool is_encrypted = false; - while (!IsSaneCount (count) || base_offset >= file.MaxOffset || (!is_compressed && base_offset != (0x1C + count*0x18))) + int min_offset = 0x1C + count * 0x18; + while (!IsSaneCount (count) || base_offset >= file.MaxOffset + || (2 == version && !is_compressed && base_offset != min_offset)) { if (is_encrypted) return null; diff --git a/supported.html b/supported.html index 272b5a8c..a05f85c8 100644 --- a/supported.html +++ b/supported.html @@ -140,6 +140,7 @@ Shiosai no Himei
Cynthia ~Sincerely to You~
Folklore Jam
I/O
+Natsuiro Kouen ~Denpatou no Shita de Ai wo Kataru~
Onegai O-Hoshi-sama
Tsuma Youji
Tsuma Youji 2
@@ -308,6 +309,7 @@ Yatohime Zankikou
*.arc+*.ariWFL1NoKaGuYa Onna Kyoushi
Medorei ~Okasareta Houkago~
+Serina
Ura Nyuugaku ~Ineki ni Nureta Kyoukasho~
*.bg_
*.cg_APYes @@ -336,9 +338,10 @@ Maid no Yakata ~Zetsubou Hen~
*.crxCRXGNo *.pcmXPCMNo -*.pakCHERRY PACK 2.0
-NoCherry +*.pakCHERRY PACK 2.0
CHERRY PACK 3.0
-NoCherry Double
Exile ~Blood Royal 2~
+Gakuen ~Nerawareta Chitai~
Kimon Youitan
Unbalance
@@ -409,6 +412,7 @@ Kango Sentai Nurse Ranger
*.abmBMNo *.arc
*.xarc
*.binMIKO
KOTORINoXuse
ETERNAL Kikouyoku Senki Gin no Toki no Corona
+Nega0
*.wag
*.4agWAG@
GAF4No *.ykcYKC001YesYuka @@ -505,10 +509,10 @@ Ippai Shimasho
*.gpc+*.gph
*.snd+*.snh
*.snr+*.snh-NoEushully Genrin no Kishougun
-*.mpk-Nopropeller +*.mpk-Nopropeller Bullet Butlers
-*.mgr-No +*.mgr-No

1 Non-encrypted only