(AgReader.Unpack): local var name.

This commit is contained in:
morkt 2018-02-02 03:26:17 +04:00
parent 0cbbb6dee8
commit dc33220179

View File

@ -135,7 +135,7 @@ namespace GameRes.Formats.Megu
public void Unpack () public void Unpack ()
{ {
int v20 = 1; int bit_mask = 1;
int src1 = 0; int src1 = 0;
uint v25 = LittleEndian.ToUInt32 (in1, src1); uint v25 = LittleEndian.ToUInt32 (in1, src1);
src1 += 4; src1 += 4;
@ -166,7 +166,7 @@ namespace GameRes.Formats.Megu
int dst = y * stride; int dst = y * stride;
for (int x = 0; x < stride; x += m_pixel_size) for (int x = 0; x < stride; x += m_pixel_size)
{ {
if (0 != (v20 & v25)) if (0 != (bit_mask & v25))
{ {
B = (byte)(v21 >> v19); B = (byte)(v21 >> v19);
v19 += 8; v19 += 8;
@ -214,14 +214,14 @@ namespace GameRes.Formats.Megu
src3 += 4; src3 += 4;
} }
} }
v20 <<= 1; bit_mask <<= 1;
if (0 == v20) if (0 == bit_mask)
{ {
v25 = LittleEndian.ToUInt32 (in1, src1); v25 = LittleEndian.ToUInt32 (in1, src1);
src1 += 4; src1 += 4;
v20 = 1; bit_mask = 1;
} }
if (0 != (v20 & v25)) if (0 != (bit_mask & v25))
{ {
G = (byte)(v21 >> v19); G = (byte)(v21 >> v19);
v19 += 8; v19 += 8;
@ -269,14 +269,14 @@ namespace GameRes.Formats.Megu
src3 += 4; src3 += 4;
} }
} }
v20 <<= 1; bit_mask <<= 1;
if (0 == v20) if (0 == bit_mask)
{ {
v25 = LittleEndian.ToUInt32 (in1, src1); v25 = LittleEndian.ToUInt32 (in1, src1);
src1 += 4; src1 += 4;
v20 = 1; bit_mask = 1;
} }
if (0 != (v20 & v25)) if (0 != (bit_mask & v25))
{ {
R = (byte)(v21 >> v19); R = (byte)(v21 >> v19);
v19 += 8; v19 += 8;
@ -324,12 +324,12 @@ namespace GameRes.Formats.Megu
src3 += 4; src3 += 4;
} }
} }
v20 <<= 1; bit_mask <<= 1;
if (0 == v20) if (0 == bit_mask)
{ {
v25 = LittleEndian.ToUInt32 (in1, src1); v25 = LittleEndian.ToUInt32 (in1, src1);
src1 += 4; src1 += 4;
v20 = 1; bit_mask = 1;
} }
m_output[dst+x] = B; m_output[dst+x] = B;
m_output[dst+x+1] = G; m_output[dst+x+1] = G;