diff --git a/ArcFormats/Properties/AssemblyInfo.cs b/ArcFormats/Properties/AssemblyInfo.cs index d01fe814..0b880131 100644 --- a/ArcFormats/Properties/AssemblyInfo.cs +++ b/ArcFormats/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion ("1.1.9.401")] -[assembly: AssemblyFileVersion ("1.1.9.401")] +[assembly: AssemblyVersion ("1.1.9.406")] +[assembly: AssemblyFileVersion ("1.1.9.406")] diff --git a/ArcFormats/Yuka/ArcYKC.cs b/ArcFormats/Yuka/ArcYKC.cs index 4f460454..8fae5c1c 100644 --- a/ArcFormats/Yuka/ArcYKC.cs +++ b/ArcFormats/Yuka/ArcYKC.cs @@ -48,6 +48,11 @@ namespace GameRes.Formats.Yuka public override bool IsHierarchic { get { return true; } } public override bool CanCreate { get { return true; } } + public YkcOpener () + { + Extensions = new string[] { "ykc", "dat" }; + } + public override ArcFile TryOpen (ArcView file) { if (0x3130 != file.View.ReadUInt32 (4)) @@ -82,6 +87,23 @@ namespace GameRes.Formats.Yuka return new ArcFile (file, this, dir); } + public override Stream OpenEntry (ArcFile arc, Entry entry) + { + if (entry.Size < 0x24 + || !entry.Name.EndsWith (".yks", StringComparison.InvariantCultureIgnoreCase) + || !arc.File.View.AsciiEqual (entry.Offset, "YKS001") + || 1 != arc.File.View.ReadUInt16 (entry.Offset+6)) + return arc.File.CreateStream (entry.Offset, entry.Size); + // decrypt script contents + var data = new byte[entry.Size]; + arc.File.View.Read (entry.Offset, data, 0, entry.Size); + uint text_offset = LittleEndian.ToUInt32 (data, 0x20); + for (uint i = text_offset; i < data.Length; ++i) + data[i] ^= 0xAA; + data[6] = 0; + return new MemoryStream (data); + } + public override void Create (Stream output, IEnumerable list, ResourceOptions options, EntryCallback callback) { diff --git a/supported.html b/supported.html index dbbc97a2..bbb747eb 100644 --- a/supported.html +++ b/supported.html @@ -345,6 +345,7 @@ Kikouyoku Senki Gin no Toki no Corona
*.wag
*.4agWAG@
GAF4No *.ykcYKC001YesYuka SuGirly Wish
+_summer
*.ykgYKG000No *.pakGCEXNoG2