Removing remaining SheetType.DualIndexed plumbing.
This commit is contained in:
@@ -25,8 +25,7 @@ namespace OpenRA.Graphics
|
|||||||
public enum SheetType
|
public enum SheetType
|
||||||
{
|
{
|
||||||
Indexed = 1,
|
Indexed = 1,
|
||||||
DualIndexed = 2,
|
BGRA = 2,
|
||||||
BGRA = 4,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class SheetBuilder : IDisposable
|
public sealed class SheetBuilder : IDisposable
|
||||||
|
|||||||
@@ -55,13 +55,12 @@ namespace OpenRA.Graphics
|
|||||||
vertices[nv + 5] = new Vertex(a, r.Left, r.Top, sl, st, paletteTextureIndex, attribC);
|
vertices[nv + 5] = new Vertex(a, r.Left, r.Top, sl, st, paletteTextureIndex, attribC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FastCopyIntoChannel(Sprite dest, byte[] src) { FastCopyIntoChannel(dest, 0, src); }
|
public static void FastCopyIntoChannel(Sprite dest, byte[] src)
|
||||||
public static void FastCopyIntoChannel(Sprite dest, int channelOffset, byte[] src)
|
|
||||||
{
|
{
|
||||||
var data = dest.Sheet.GetData();
|
var data = dest.Sheet.GetData();
|
||||||
var srcStride = dest.Bounds.Width;
|
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 + channelOffset];
|
var destOffset = destStride * dest.Bounds.Top + dest.Bounds.Left * 4 + ChannelMasks[(int)dest.Channel];
|
||||||
var destSkip = destStride - 4 * srcStride;
|
var destSkip = destStride - 4 * srcStride;
|
||||||
var height = dest.Bounds.Height;
|
var height = dest.Bounds.Height;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user