[Fixing indentation]

This commit is contained in:
Bob
2009-11-19 15:02:04 +13:00
parent e427e6b16e
commit a17296ff8a
13 changed files with 244 additions and 249 deletions

View File

@@ -118,7 +118,7 @@ namespace OpenRa.FileFormats
for( int i = 0 ; i < 128 ; i++ )
for( int j = 0 ; j < 128 ; j++ )
{
MapTiles[j, i].image = (byte)ms.ReadByte();
MapTiles[j, i].image = (byte)ms.ReadByte();
if( MapTiles[ j, i ].tile == 0xff || MapTiles[ j, i ].tile == 0xffff )
MapTiles[ j, i ].image = (byte)( i % 4 + ( j % 4 ) * 4 );
}

View File

@@ -17,14 +17,14 @@ namespace OpenRa.FileFormats
readonly Dictionary<uint, PackageEntry> index;
readonly bool isRmix, isEncrypted;
readonly long dataStart;
readonly Stream s;
readonly Stream s;
public Package(string filename)
{
this.filename = filename;
s = FileSystem.Open(filename);
s = FileSystem.Open(filename);
BinaryReader reader = new BinaryReader(s);
BinaryReader reader = new BinaryReader(s);
uint signature = reader.ReadUInt32();
isRmix = 0 == (signature & ~(uint)(MixFileFlags.Checksum | MixFileFlags.Encrypted));
@@ -50,7 +50,7 @@ namespace OpenRa.FileFormats
{
BinaryReader reader = new BinaryReader(s);
byte[] keyblock = reader.ReadBytes(80);
byte[] blowfishKey = new BlowfishKeyProvider().DecryptKey(keyblock);
byte[] blowfishKey = new BlowfishKeyProvider().DecryptKey(keyblock);
uint[] h = ReadUints(reader, 2);
@@ -117,9 +117,9 @@ namespace OpenRa.FileFormats
public Stream GetContent(uint hash)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
return null;
PackageEntry e;
if (!index.TryGetValue(hash, out e))
return null;
s.Seek( dataStart + e.Offset, SeekOrigin.Begin );
byte[] data = new byte[ e.Length ];

View File

@@ -39,11 +39,11 @@ namespace OpenRa.FileFormats
MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
BinaryReader reader = new BinaryReader(ms);
int len = name.Length >> 2;
int len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}

View File

@@ -109,7 +109,7 @@ namespace OpenRa.FileFormats
}
h.Image = CopyImageData( h.RefImage.Image );
Format40.DecodeInto(ReadCompressedData(stream, h), h.Image);
Format40.DecodeInto(ReadCompressedData(stream, h), h.Image);
break;
}
case Format.Format80: