From 1f1816bf2f5223031dfad13d9c5d6ec05d31ab55 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 15 Mar 2016 18:53:56 +0400 Subject: [PATCH] (VafsOpener): treat filename extension as a version. --- ArcFormats/Softpal/ArcVAFS.cs | 6 ++++-- supported.html | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ArcFormats/Softpal/ArcVAFS.cs b/ArcFormats/Softpal/ArcVAFS.cs index 9b277118..c3b74a82 100644 --- a/ArcFormats/Softpal/ArcVAFS.cs +++ b/ArcFormats/Softpal/ArcVAFS.cs @@ -43,7 +43,7 @@ namespace GameRes.Formats.Softpal public VafsOpener () { - Extensions = new string[] { "052", "055" }; + Extensions = new string[] { "052", "055", "058" }; } static readonly Lazy s_PicFormat = new Lazy (() => ImageFormat.FindByTag ("PIC/SOFTPAL")); @@ -57,7 +57,9 @@ namespace GameRes.Formats.Softpal var base_name = Path.GetFileNameWithoutExtension (file.Name).ToUpperInvariant(); if (0 == data_offset && "TP" == base_name) { - if (file.Name.EndsWith (".055")) + var ext = Path.GetExtension (file.Name).TrimStart ('.'); + int version; + if (int.TryParse (ext, out version) && version >= 55) return OpenTp055Arc (file); else return OpenTpArc (file); diff --git a/supported.html b/supported.html index 1613b353..118ddb6a 100644 --- a/supported.html +++ b/supported.html @@ -715,9 +715,10 @@ Mahokoi ~Ecchi na Mahou de Koi x Koi Shichau~
Kuro to Kuro to Kuro no Saidan ~Kodoku~
Mikan
-*.052
*.055VAFSHNoSoftpal +*.052
*.055
*.058VAFSHNoSoftpal Komorebi ni Yureru Tamashii no Koe
Komokyun!! ~Heart ni Yureru Tamashi no Fandisc~
+Heavenly Guilt -Kami no Inai Machi-
*BPICNo *NNNNNoMoko Pro