From cacacd45dccf34eee2ddb8ed643e145ab087e497 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 2 Nov 2015 05:46:59 +0400 Subject: [PATCH] (AbmOpener): pixel size depends on image 'type' field. --- ArcFormats/Lilim/ArcABM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArcFormats/Lilim/ArcABM.cs b/ArcFormats/Lilim/ArcABM.cs index b6b4c2c1..93ffea12 100644 --- a/ArcFormats/Lilim/ArcABM.cs +++ b/ArcFormats/Lilim/ArcABM.cs @@ -82,7 +82,8 @@ namespace GameRes.Formats.Lilim uint width = file.View.ReadUInt32 (0x12); uint height = file.View.ReadUInt32 (0x16); - uint bitmap_data_size = width*height*3; + int pixel_size = 2 == type ? 4 : 3; + uint bitmap_data_size = width*height*(uint)pixel_size; var dir = new List (count); long next_offset = file.View.ReadUInt32 (0x42); @@ -111,7 +112,6 @@ namespace GameRes.Formats.Lilim entry.UnpackedSize = 0x12 + bitmap_data_size; dir.Add (entry); } - int pixel_size = file.View.ReadUInt16 (0x38); var image_info = new AbmImageData { Width = (uint)width,