From 5e21cce43d8c91ee13eccffb035b7cb0751f48bc Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 29 Dec 2017 13:39:26 +0400 Subject: [PATCH] (GRB): fixed 1bpp bitmaps. --- Legacy/CrossNet/ImageGRB.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Legacy/CrossNet/ImageGRB.cs b/Legacy/CrossNet/ImageGRB.cs index ab7a9d72..6fe5738a 100644 --- a/Legacy/CrossNet/ImageGRB.cs +++ b/Legacy/CrossNet/ImageGRB.cs @@ -130,17 +130,17 @@ namespace GameRes.Formats.CrossNet } var row_data = m_input.ReadBytes (m_height); - int blocks = m_width >> 2; + int blocks = m_stride >> 2; m_input.Position = m_info.BitsOffset; var ctl_data = m_input.ReadBytes (m_height * blocks); int src = 0; int dst = 0; var offsets = new int[4,4] { - { 0, -1, -m_width, -m_width-1 }, + { 0, -1, -m_stride, -m_stride-1 }, { 0, -1, -2, -3 }, - { 0, -m_width, -m_width * 2, -m_width * 3 }, - { 0, -m_width-1, -m_width, -m_width+1 } + { 0, -m_stride, -m_stride * 2, -m_stride * 3 }, + { 0, -m_stride-1, -m_stride, -m_stride+1 } }; m_input.Position = m_info.DataOffset;