Support for Dune II SHP files used for cursors in Red Alert.

This commit is contained in:
Matthew Bowra-Dean
2009-10-12 09:45:15 +13:00
parent 99b508956e
commit 99ad09ddc2
7 changed files with 475 additions and 221 deletions

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.FileFormats
{
public static class Format2
{
public static int DecodeInto(byte[] src, byte[] dest)
{
FastByteReader r = new FastByteReader(src);
int i = 0;
while (!r.Done())
{
byte cmd = r.ReadByte();
if (cmd == 0)
{
byte count = r.ReadByte();
while (count-- > 0)
dest[i++] = 0;
}
else
dest[i++] = cmd;
}
return i;
}
}
}