Fixed some messed up indents in Color.cs

This commit is contained in:
SND\eagleeyestudios_cp 2012-10-09 18:26:32 +00:00 committed by Konstantin Koch
parent dffb3bc29c
commit b5d8b48376

View File

@ -857,27 +857,28 @@ namespace ANX.Framework
{
Color color;
byte r1 = (byte)value1.packedValue;
byte g1 = (byte)(value1.packedValue >> 8);
byte b1 = (byte)(value1.packedValue >> 16);
byte a1 = (byte)(value1.packedValue >> 24);
byte r1 = (byte) value1.packedValue;
byte g1 = (byte) (value1.packedValue >> 8);
byte b1 = (byte) (value1.packedValue >> 16);
byte a1 = (byte) (value1.packedValue >> 24);
byte r2 = (byte)value2.packedValue;
byte g2 = (byte)(value2.packedValue >> 8);
byte b2 = (byte)(value2.packedValue >> 16);
byte a2 = (byte)(value2.packedValue >> 24);
byte r2 = (byte) value2.packedValue;
byte g2 = (byte) (value2.packedValue >> 8);
byte b2 = (byte) (value2.packedValue >> 16);
byte a2 = (byte) (value2.packedValue >> 24);
int factor = (int)PackUNormal(65536f, amount);
int factor = (int) PackUNormal(65536f, amount);
int r3 = r1 + (((r2 - r1) * factor) >> 16);
int g3 = g1 + (((g2 - g1) * factor) >> 16);
int b3 = b1 + (((b2 - b1) * factor) >> 16);
int a3 = a1 + (((a2 - a1) * factor) >> 16);
int r3 = r1 + (((r2 - r1)*factor) >> 16);
int g3 = g1 + (((g2 - g1)*factor) >> 16);
int b3 = b1 + (((b2 - b1)*factor) >> 16);
int a3 = a1 + (((a2 - a1)*factor) >> 16);
color.packedValue = (uint)(((r3 | (g3 << 8)) | (b3 << 16)) | (a3 << 24));
color.packedValue = (uint) (((r3 | (g3 << 8)) | (b3 << 16)) | (a3 << 24));
return color;
}
#endregion
#region Multiply
@ -885,17 +886,17 @@ namespace ANX.Framework
{
Color color;
uint r = (byte)value.packedValue;
uint g = (byte)(value.packedValue >> 8);
uint b = (byte)(value.packedValue >> 16);
uint a = (byte)(value.packedValue >> 24);
uint r = (byte) value.packedValue;
uint g = (byte) (value.packedValue >> 8);
uint b = (byte) (value.packedValue >> 16);
uint a = (byte) (value.packedValue >> 24);
uint uintScale = (uint)MathHelper.Clamp(scale * 65536f, 0, 0xffffff);
uint uintScale = (uint) MathHelper.Clamp(scale*65536f, 0, 0xffffff);
r = (r * uintScale) >> 16;
g = (g * uintScale) >> 16;
b = (b * uintScale) >> 16;
a = (a * uintScale) >> 16;
r = (r*uintScale) >> 16;
g = (g*uintScale) >> 16;
b = (b*uintScale) >> 16;
a = (a*uintScale) >> 16;
r = r > 255 ? 255 : r;
g = g > 255 ? 255 : g;
@ -906,6 +907,7 @@ namespace ANX.Framework
return color;
}
#endregion
public static Color operator *(Color a, float scale)