bunch of stuff.

This commit is contained in:
morkt
2023-08-24 01:33:50 +04:00
parent ea096c52ef
commit 77fde27d26
119 changed files with 11078 additions and 619 deletions

View File

@@ -136,14 +136,18 @@ namespace GameRes.Formats.Cadath
if (0 != (bits[i >> 3] & 1))
{
byte v = m_input.ReadUInt8();
int count = m_input.ReadUInt8() + 3;
int count = Math.Min (m_input.ReadUInt8() + 3, data.Length - dst);
for (int j = 0; j < count; ++j)
{
data[dst++] = v;
}
}
else
{
data[dst++] = m_input.ReadUInt8();
}
if (dst >= data.Length)
break;
bits[i >> 3] >>= 1;
}
CopyChannels (data);