Renormalize line endings and fix copyright headers again.

This commit is contained in:
Paul Chote
2011-04-07 21:15:42 +12:00
parent 1a49b46af1
commit b0425aff3b
144 changed files with 8076 additions and 7746 deletions

View File

@@ -55,20 +55,20 @@ namespace OpenRA.Graphics
vertices[nv + 2] = new Vertex(new float2(o.X, o.Y + size.Y),
r.FastMapTextureCoords(2), attrib);
vertices[nv + 3] = new Vertex(new float2(o.X + size.X, o.Y + size.Y),
r.FastMapTextureCoords(3), attrib);
indices[ni] = (uint)(nv);
indices[ni + 1] = indices[ni + 3] = (uint)(nv + 1);
r.FastMapTextureCoords(3), attrib);
indices[ni] = (uint)(nv);
indices[ni + 1] = indices[ni + 3] = (uint)(nv + 1);
indices[ni + 2] = indices[ni + 5] = (uint)(nv + 2);
indices[ni + 4] = (uint)(nv + 3);
}
}
static readonly int[] channelMasks = { 2, 1, 0, 3 }; // yes, our channel order is nuts.
public static void FastCopyIntoChannel(Sprite dest, byte[] src)
{
var data = dest.sheet.Data;
var srcStride = dest.bounds.Width;
var destStride = dest.sheet.Size.Width * 4;
var destStride = dest.sheet.Size.Width * 4;
var destOffset = destStride * dest.bounds.Top + dest.bounds.Left * 4 + channelMasks[(int)dest.channel];
var destSkip = destStride - 4 * srcStride;
var height = dest.bounds.Height;