mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(QLIE): updated 'FilePackVer3.1' archives support (#84)
This commit is contained in:
@@ -38,10 +38,12 @@ namespace GameRes.Formats.Qlie
|
||||
{
|
||||
internal class QlieEntry : PackedEntry
|
||||
{
|
||||
public bool IsEncrypted;
|
||||
public int EncryptionMethod;
|
||||
public uint Hash;
|
||||
public byte[] RawName;
|
||||
|
||||
public bool IsEncrypted { get { return EncryptionMethod != 0; } }
|
||||
|
||||
/// <summary>
|
||||
/// Data from a separate key file "key.fkey" that comes with installed game.
|
||||
/// null if not used.
|
||||
@@ -153,7 +155,7 @@ namespace GameRes.Formats.Qlie
|
||||
return null;
|
||||
entry.UnpackedSize = index.ReadUInt32(); // [+0C]
|
||||
entry.IsPacked = 0 != index.ReadInt32(); // [+10]
|
||||
entry.IsEncrypted = 0 != index.ReadInt32(); // [+14]
|
||||
entry.EncryptionMethod = index.ReadInt32(); // [+14]
|
||||
entry.Hash = index.ReadUInt32(); // [+18]
|
||||
entry.KeyFile = key_file;
|
||||
if (3 == pack_version.Major && use_pack_keyfile && entry.Name.Contains ("pack_keyfile"))
|
||||
@@ -330,6 +332,16 @@ namespace GameRes.Formats.Qlie
|
||||
return File.ReadAllBytes (name);
|
||||
}
|
||||
}
|
||||
var pattern = VFS.CombinePath (dir_name, @"..\*.exe");
|
||||
foreach (var exe_file in VFS.GetFiles (pattern))
|
||||
{
|
||||
using (var exe = new ExeFile.ResourceAccessor (exe_file.Name))
|
||||
{
|
||||
var reskey = exe.GetResource ("RESKEY", "#10");
|
||||
if (reskey != null)
|
||||
return reskey;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user