Fix newlines in C# files.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user