updated formats.

(PICT): fixed 16bpp images.
(GDT): added image format.
(DXR): tweaks to recognizing DXR inside exe files.
(NSA): recognize mp3 files named as nsa.
(TLZ): added ContainedFormats.
(WrapSingleFileAchive): class that represents single file as an archive.
(DesertCgOPener): Software House Parsley archive.
(Triangle.RleReader): utilize UnpackV2, replaced BinaryReader with IBinaryStream.
This commit is contained in:
morkt
2023-10-11 18:38:23 +04:00
parent e4e85fe879
commit 1b585ea30e
11 changed files with 872 additions and 40 deletions

View File

@@ -60,6 +60,7 @@ namespace GameRes.Formats.Lilim
if (!name_buf.SequenceEqual (IndexLink) && !name_buf.SequenceEqual (IndexEnd))
return null;
string last_name = null;
long current_offset = 0;
var dir = new List<Entry> (0x3E);
while (current_offset < file.MaxOffset)
@@ -79,6 +80,9 @@ namespace GameRes.Formats.Lilim
if (-1 == name_length)
name_length = name_buf.Length;
var name = Encodings.cp932.GetString (name_buf, 0, name_length);
if (last_name == name || string.IsNullOrWhiteSpace (name))
return null;
last_name = name;
var entry = FormatCatalog.Instance.Create<PackedEntry> (name);
entry.Offset = file.View.ReadUInt32 (current_offset+0x10);
entry.Size = file.View.ReadUInt32 (current_offset+0x14);