From 5d0990f1c65b8aa8c7f717103646a3512f5261c5 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 10 Apr 2016 20:05:05 -0400 Subject: [PATCH] Removing remaining SheetType.DualIndexed plumbing. --- OpenRA.Game/Graphics/SheetBuilder.cs | 3 +-- OpenRA.Game/Graphics/Util.cs | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/OpenRA.Game/Graphics/SheetBuilder.cs b/OpenRA.Game/Graphics/SheetBuilder.cs index f64868ff4b..c95fb1909d 100644 --- a/OpenRA.Game/Graphics/SheetBuilder.cs +++ b/OpenRA.Game/Graphics/SheetBuilder.cs @@ -25,8 +25,7 @@ namespace OpenRA.Graphics public enum SheetType { Indexed = 1, - DualIndexed = 2, - BGRA = 4, + BGRA = 2, } public sealed class SheetBuilder : IDisposable diff --git a/OpenRA.Game/Graphics/Util.cs b/OpenRA.Game/Graphics/Util.cs index 85e66a1747..177afbd2bb 100644 --- a/OpenRA.Game/Graphics/Util.cs +++ b/OpenRA.Game/Graphics/Util.cs @@ -55,13 +55,12 @@ namespace OpenRA.Graphics 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, int channelOffset, byte[] src) + public static void FastCopyIntoChannel(Sprite dest, byte[] src) { var data = dest.Sheet.GetData(); var srcStride = dest.Bounds.Width; 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 height = dest.Bounds.Height;