(ArcOpener): use ImageFormat.FindByTag shortcut method.

This commit is contained in:
morkt 2015-12-27 18:38:00 +04:00
parent 583b2f60b3
commit b24a91a57f

View File

@ -102,11 +102,11 @@ namespace GameRes.Formats.MAI
var entry = new AutoEntry (Path.Combine (current_folder, name), () => { var entry = new AutoEntry (Path.Combine (current_folder, name), () => {
uint signature = file.View.ReadUInt32 (offset); uint signature = file.View.ReadUInt32 (offset);
if (is_mask_arc) if (is_mask_arc)
return FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "MSK/MAI"); return ImageFormat.FindByTag ("MSK/MAI");
else if (0x4d43 == (signature & 0xffff)) // 'CM' else if (0x4d43 == (signature & 0xffff)) // 'CM'
return FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "CMP/MAI"); return ImageFormat.FindByTag ("CMP/MAI");
else if (0x4d41 == (signature & 0xffff)) // 'AM' else if (0x4d41 == (signature & 0xffff)) // 'AM'
return FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "AM/MAI"); return ImageFormat.FindByTag ("AM/MAI");
else if (0x4d42 == (signature & 0xffff)) // 'BM' else if (0x4d42 == (signature & 0xffff)) // 'BM'
return ImageFormat.Bmp; return ImageFormat.Bmp;
else if (signature != 0) else if (signature != 0)