Fix newlines in C# files.

This commit is contained in:
Paul Chote
2018-07-01 00:48:03 +01:00
committed by reaperrr
parent 6b6167d37c
commit 8c0f4fde81
15 changed files with 51 additions and 51 deletions

View File

@@ -109,24 +109,24 @@ namespace OpenRA.Mods.Common.SpriteLoaders
}
var trimmedWidth = right - left + 1;
var trimmedHeight = bottom - top + 1;
// Pad the dimensions to an even number to avoid issues with half-integer offsets
var trimmedHeight = bottom - top + 1;
// Pad the dimensions to an even number to avoid issues with half-integer offsets
var widthFudge = trimmedWidth % 2;
var heightFudge = trimmedHeight % 2;
var destWidth = trimmedWidth + widthFudge;
var destHeight = trimmedHeight + heightFudge;
var destHeight = trimmedHeight + heightFudge;
if (trimmedWidth == origSize.Width && trimmedHeight == origSize.Height)
{
// Nothing to trim, so copy old data directly
{
// Nothing to trim, so copy old data directly
Size = header.Size;
FrameSize = header.FrameSize;
Offset = header.Offset;
Data = header.Data;
}
else if (trimmedWidth > 0 && trimmedHeight > 0)
{
{
// Trim frame
Data = new byte[destWidth * destHeight];
for (var y = 0; y < trimmedHeight; y++)
@@ -139,8 +139,8 @@ namespace OpenRA.Mods.Common.SpriteLoaders
top + bottom + heightFudge - origSize.Height + 1);
}
else
{
// Empty frame
{
// Empty frame
Data = new byte[0];
}
}