Fix 8-frame glitch

This commit is contained in:
Paul Chote
2010-08-11 00:44:54 +12:00
parent b98e180361
commit 16c3223f3e

View File

@@ -196,14 +196,16 @@ namespace OpenRA.FileFormats
// Partial compressed frame-modifier
case "CBPZ":
var bytes = reader.ReadBytes(subchunkLength);
foreach (var b in bytes) newcbfFormat80.Add(b);
if (++cbpCount == cbParts) // Update the frame-modifier
// Partial buffer is full; dump and recreate
if (cbpCount == cbParts)
{
Format80.DecodeInto( newcbfFormat80.ToArray(), cbf );
cbpCount = 0;
newcbfFormat80.Clear();
}
var bytes = reader.ReadBytes(subchunkLength);
foreach (var b in bytes) newcbfFormat80.Add(b);
cbpCount++;
break;
// Palette