cnc support (doesn't use format80)
This commit is contained in:
@@ -127,7 +127,6 @@ namespace OpenRA.FileFormats
|
|||||||
{
|
{
|
||||||
var type = new String(reader.ReadChars(4));
|
var type = new String(reader.ReadChars(4));
|
||||||
var length = Swap(reader.ReadUInt32());
|
var length = Swap(reader.ReadUInt32());
|
||||||
Console.WriteLine("Parsing chunk {0}@{1}",type, reader.BaseStream.Position-4);
|
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
@@ -186,13 +185,15 @@ namespace OpenRA.FileFormats
|
|||||||
var type = new String(reader.ReadChars(4));
|
var type = new String(reader.ReadChars(4));
|
||||||
int subchunkLength = (int)Swap(reader.ReadUInt32());
|
int subchunkLength = (int)Swap(reader.ReadUInt32());
|
||||||
|
|
||||||
Console.WriteLine("Parsing VQFR sub-chunk {0}@{1}",type, reader.BaseStream.Position-4);
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
// Full compressed frame-modifier
|
// Full compressed frame-modifier
|
||||||
case "CBFZ":
|
case "CBFZ":
|
||||||
Format80.DecodeInto( reader.ReadBytes(subchunkLength), cbf );
|
Format80.DecodeInto( reader.ReadBytes(subchunkLength), cbf );
|
||||||
break;
|
break;
|
||||||
|
case "CBF0":
|
||||||
|
cbf = reader.ReadBytes(subchunkLength);
|
||||||
|
break;
|
||||||
|
|
||||||
// Partial compressed frame-modifier
|
// Partial compressed frame-modifier
|
||||||
case "CBPZ":
|
case "CBPZ":
|
||||||
@@ -207,7 +208,18 @@ namespace OpenRA.FileFormats
|
|||||||
foreach (var b in bytes) newcbfFormat80.Add(b);
|
foreach (var b in bytes) newcbfFormat80.Add(b);
|
||||||
cbpCount++;
|
cbpCount++;
|
||||||
break;
|
break;
|
||||||
|
case "CBP0":
|
||||||
|
// Partial buffer is full; dump and recreate
|
||||||
|
if (cbpCount == cbParts)
|
||||||
|
{
|
||||||
|
cbf = newcbfFormat80.ToArray();
|
||||||
|
cbpCount = 0;
|
||||||
|
newcbfFormat80.Clear();
|
||||||
|
}
|
||||||
|
var bytes2 = reader.ReadBytes(subchunkLength);
|
||||||
|
foreach (var b in bytes2) newcbfFormat80.Add(b);
|
||||||
|
cbpCount++;
|
||||||
|
break;
|
||||||
// Palette
|
// Palette
|
||||||
case "CPL0":
|
case "CPL0":
|
||||||
for (int i = 0; i < numColors; i++)
|
for (int i = 0; i < numColors; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user