(Ail): detect audio and video files.

This commit is contained in:
morkt 2018-02-16 19:32:41 +04:00
parent 787cc68192
commit e09d5ae5df

View File

@ -116,7 +116,7 @@ namespace GameRes.Formats.Ail
entry.IsPacked = true; entry.IsPacked = true;
entry.UnpackedSize = file.View.ReadUInt32 (entry.Offset+2); entry.UnpackedSize = file.View.ReadUInt32 (entry.Offset+2);
} }
else if (0 == signature) else if (0 == signature || file.View.AsciiEqual (entry.Offset+4, "OggS"))
{ {
extra = 4; extra = 4;
} }
@ -141,11 +141,19 @@ namespace GameRes.Formats.Ail
} }
static void SetEntryType (Entry entry, uint signature) static void SetEntryType (Entry entry, uint signature)
{
if (0xBA010000 == signature)
{
entry.Type = "video";
entry.Name = Path.ChangeExtension (entry.Name, "mpg");
}
else
{ {
var res = AutoEntry.DetectFileType (signature); var res = AutoEntry.DetectFileType (signature);
if (null != res) if (null != res)
entry.ChangeType (res); entry.ChangeType (res);
} }
}
/// <summary> /// <summary>
/// Custom LZSS decompression with frame pre-initialization and reveresed control bits meaning. /// Custom LZSS decompression with frame pre-initialization and reveresed control bits meaning.