(ArcOpener): report real file size as UnpackedSize.

This commit is contained in:
morkt 2015-08-17 07:07:19 +04:00
parent f3902a4cf1
commit 6b62a1701d

View File

@ -145,7 +145,7 @@ namespace GameRes.Formats.Xuse
var dir = new List<Entry> (count); var dir = new List<Entry> (count);
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {
var entry = new Entry { var entry = new PackedEntry {
Name = string.Format ("{0}#{1:D4}.ogg", base_name, i), Name = string.Format ("{0}#{1:D4}.ogg", base_name, i),
Type = "audio", Type = "audio",
Offset = next_offset, Offset = next_offset,
@ -158,6 +158,11 @@ namespace GameRes.Formats.Xuse
else else
next_offset = file.MaxOffset; next_offset = file.MaxOffset;
entry.Size = (uint)(next_offset - entry.Offset); entry.Size = (uint)(next_offset - entry.Offset);
if (entry.Size >= 0x32)
{
entry.IsPacked = true;
entry.UnpackedSize = entry.Size - 0x32;
}
if (!entry.CheckPlacement (file.MaxOffset)) if (!entry.CheckPlacement (file.MaxOffset))
return null; return null;
dir.Add (entry); dir.Add (entry);