mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(DgcFormat.Reader): use CopyOverlapped instead of BlockCopy.
This commit is contained in:
@@ -278,7 +278,9 @@ namespace GameRes.Formats.Dac
|
|||||||
int count = (ctl & 0x3F) + 2;
|
int count = (ctl & 0x3F) + 2;
|
||||||
int offset = ctl >> 6;
|
int offset = ctl >> 6;
|
||||||
offset *= m_pixel_size;
|
offset *= m_pixel_size;
|
||||||
Buffer.BlockCopy (m_output, dst+offset, m_output, dst, count*m_pixel_size);
|
count *= m_pixel_size;
|
||||||
|
Binary.CopyOverlapped (m_output, dst+offset, dst, count);
|
||||||
|
dst += count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -355,8 +357,7 @@ namespace GameRes.Formats.Dac
|
|||||||
--length;
|
--length;
|
||||||
if (0 == (ctl & 0x80))
|
if (0 == (ctl & 0x80))
|
||||||
{
|
{
|
||||||
int count = ctl + 2;
|
for (int count = ctl + 2; 0 != count; --count)
|
||||||
while (0 != count--)
|
|
||||||
{
|
{
|
||||||
int src = 3 * m_input.ReadByte();
|
int src = 3 * m_input.ReadByte();
|
||||||
--length;
|
--length;
|
||||||
@@ -373,8 +374,9 @@ namespace GameRes.Formats.Dac
|
|||||||
int count = (offset & 0x3F) + 4;
|
int count = (offset & 0x3F) + 4;
|
||||||
offset >>= 6;
|
offset >>= 6;
|
||||||
offset *= m_pixel_size;
|
offset *= m_pixel_size;
|
||||||
Buffer.BlockCopy (m_output, dst+offset, m_output, dst, count*m_pixel_size);
|
count *= m_pixel_size;
|
||||||
dst += count*m_pixel_size;
|
Binary.CopyOverlapped (m_output, dst+offset, dst, count);
|
||||||
|
dst += count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user