Rename WW-created compression formats.
This commit is contained in:
@@ -41,7 +41,8 @@ namespace OpenRA.FileFormats
|
||||
public int Remaining() { return src.Length - offset; }
|
||||
}
|
||||
|
||||
public static class Format80
|
||||
// Lempel - Castle - Welch algorithm (aka Format80)
|
||||
public static class LCWCompression
|
||||
{
|
||||
static void ReplicatePrevious(byte[] dest, int destIndex, int srcIndex, int count)
|
||||
{
|
||||
@@ -156,7 +157,7 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
}
|
||||
|
||||
// Quick and dirty Format80 encoder version 2
|
||||
// Quick and dirty LCW encoder version 2
|
||||
// Uses raw copy and RLE compression
|
||||
public static byte[] Encode(byte[] src)
|
||||
{
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
public static class Format2
|
||||
// Run length encoded sequences of zeros (aka Format2)
|
||||
public static class RLEZerosCompression
|
||||
{
|
||||
public static void DecodeInto(byte[] src, byte[] dest, int destIndex)
|
||||
{
|
||||
@@ -329,7 +329,7 @@ namespace OpenRA.FileFormats
|
||||
Array.Clear(cbf, 0, cbf.Length);
|
||||
Array.Clear(cbfBuffer, 0, cbfBuffer.Length);
|
||||
var decodeCount = 0;
|
||||
decodeCount = Format80.DecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode);
|
||||
decodeCount = LCWCompression.DecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode);
|
||||
if ((videoFlags & 0x10) == 16)
|
||||
{
|
||||
var p = 0;
|
||||
@@ -365,7 +365,7 @@ namespace OpenRA.FileFormats
|
||||
if (type == "CBP0")
|
||||
cbf = (byte[])cbp.Clone();
|
||||
else
|
||||
Format80.DecodeInto(cbp, cbf);
|
||||
LCWCompression.DecodeInto(cbp, cbf);
|
||||
|
||||
chunkBufferOffset = currentChunkBuffer = 0;
|
||||
}
|
||||
@@ -390,7 +390,7 @@ namespace OpenRA.FileFormats
|
||||
|
||||
// Frame data
|
||||
case "VPTZ":
|
||||
Format80.DecodeInto(s.ReadBytes(subchunkLength), origData);
|
||||
LCWCompression.DecodeInto(s.ReadBytes(subchunkLength), origData);
|
||||
|
||||
// This is the last subchunk
|
||||
return;
|
||||
@@ -398,9 +398,9 @@ namespace OpenRA.FileFormats
|
||||
Array.Clear(origData, 0, origData.Length);
|
||||
s.ReadBytes(fileBuffer, 0, subchunkLength);
|
||||
if (fileBuffer[0] != 0)
|
||||
vtprSize = Format80.DecodeInto(fileBuffer, origData);
|
||||
vtprSize = LCWCompression.DecodeInto(fileBuffer, origData);
|
||||
else
|
||||
Format80.DecodeInto(fileBuffer, origData, 1, true);
|
||||
LCWCompression.DecodeInto(fileBuffer, origData, 1, true);
|
||||
return;
|
||||
case "VPTR":
|
||||
Array.Clear(origData, 0, origData.Length);
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
public static class Format40
|
||||
// Data that is to be XORed against another set of data (aka Format40)
|
||||
public static class XORDeltaCompression
|
||||
{
|
||||
public static int DecodeInto(byte[] src, byte[] dest, int srcOffset)
|
||||
{
|
||||
@@ -255,6 +255,9 @@
|
||||
<Compile Include="Primitives\ObservableList.cs" />
|
||||
<Compile Include="Graphics\RgbaColorRenderer.cs" />
|
||||
<Compile Include="Traits\Player\IndexedPlayerPalette.cs" />
|
||||
<Compile Include="FileFormats\LCWCompression.cs" />
|
||||
<Compile Include="FileFormats\XORDeltaCompression.cs" />
|
||||
<Compile Include="FileFormats\RLEZerosCompression.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
||||
@@ -278,9 +281,6 @@
|
||||
<Compile Include="FileFormats\Blowfish.cs" />
|
||||
<Compile Include="FileFormats\BlowfishKeyProvider.cs" />
|
||||
<Compile Include="FileFormats\CRC32.cs" />
|
||||
<Compile Include="FileFormats\Format2.cs" />
|
||||
<Compile Include="FileFormats\Format40.cs" />
|
||||
<Compile Include="FileFormats\Format80.cs" />
|
||||
<Compile Include="FileFormats\IniFile.cs" />
|
||||
<Compile Include="FileFormats\WavLoader.cs" />
|
||||
<Compile Include="FileFormats\XccGlobalDatabase.cs" />
|
||||
|
||||
Reference in New Issue
Block a user