From e4c5ba26a9f2e16472f02e68fe3f1858ba117e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 1 Sep 2013 10:05:25 +0200 Subject: [PATCH] StyleCop clean PlayerColorRemap spaces to tabs --- OpenRA.FileFormats/PlayerColorRemap.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenRA.FileFormats/PlayerColorRemap.cs b/OpenRA.FileFormats/PlayerColorRemap.cs index 24befa83bb..c33b43f155 100755 --- a/OpenRA.FileFormats/PlayerColorRemap.cs +++ b/OpenRA.FileFormats/PlayerColorRemap.cs @@ -15,33 +15,33 @@ using System.Linq; namespace OpenRA.FileFormats { - public class PlayerColorRemap : IPaletteRemap { Dictionary remapColors; - public static int GetRemapIndex(int[] Ramp, int i) + public static int GetRemapIndex(int[] ramp, int i) { - return Ramp[i]; + return ramp[i]; } - public PlayerColorRemap(int[] Ramp, HSLColor c, float rampFraction) + public PlayerColorRemap(int[] ramp, HSLColor c, float rampFraction) { // Increase luminosity if required to represent the full ramp - var rampRange = (byte)((1 - rampFraction)*c.L); + var rampRange = (byte)((1 - rampFraction) * c.L); var c1 = new HSLColor(c.H, c.S, (byte)Math.Max(rampRange, c.L)).RGB; var c2 = new HSLColor(c.H, c.S, (byte)Math.Max(0, c.L - rampRange)).RGB; - var baseIndex = Ramp[0]; - var RemapRamp = Ramp.Select(r => r - Ramp[0]).ToArray(); + var baseIndex = ramp[0]; + var remapRamp = ramp.Select(r => r - ramp[0]).ToArray(); - if (Ramp[0] > Ramp[15]) // reversed remapping - { - baseIndex = Ramp[15]; + // reversed remapping + if (ramp[0] > ramp[15]) + { + baseIndex = ramp[15]; for (var i = 15; i > 0; i--) - RemapRamp = Ramp.Select(r => r - Ramp[15]).ToArray(); + remapRamp = ramp.Select(r => r - ramp[15]).ToArray(); } - remapColors = RemapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2))) + remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2))) .ToDictionary(u => u.First, u => u.Second); }