Fix StyleCop warnings in OpenRA.Game
This commit is contained in:
@@ -61,12 +61,12 @@ namespace OpenRA.Graphics
|
||||
|
||||
var l = limbData[limb];
|
||||
var t = new float[16];
|
||||
Array.Copy(transforms, 16*(Limbs*frame + limb), t, 0, 16);
|
||||
Array.Copy(transforms, 16 * (Limbs * frame + limb), t, 0, 16);
|
||||
|
||||
// Fix limb position
|
||||
t[12] *= l.Scale*(l.Bounds[3] - l.Bounds[0]) / l.Size[0];
|
||||
t[13] *= l.Scale*(l.Bounds[4] - l.Bounds[1]) / l.Size[1];
|
||||
t[14] *= l.Scale*(l.Bounds[5] - l.Bounds[2]) / l.Size[2];
|
||||
t[12] *= l.Scale * (l.Bounds[3] - l.Bounds[0]) / l.Size[0];
|
||||
t[13] *= l.Scale * (l.Bounds[4] - l.Bounds[1]) / l.Size[1];
|
||||
t[14] *= l.Scale * (l.Bounds[5] - l.Bounds[2]) / l.Size[2];
|
||||
|
||||
// Center, flip and scale
|
||||
t = Util.MatrixMultiply(t, Util.TranslationMatrix(l.Bounds[0], l.Bounds[1], l.Bounds[2]));
|
||||
@@ -84,8 +84,8 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
get
|
||||
{
|
||||
return limbData.Select(a => a.Size.Select(b => a.Scale*b).ToArray())
|
||||
.Aggregate((a,b) => new float[]
|
||||
return limbData.Select(a => a.Size.Select(b => a.Scale * b).ToArray())
|
||||
.Aggregate((a, b) => new float[]
|
||||
{
|
||||
Math.Max(a[0], b[0]),
|
||||
Math.Max(a[1], b[1]),
|
||||
@@ -96,8 +96,8 @@ namespace OpenRA.Graphics
|
||||
|
||||
public float[] Bounds(uint frame)
|
||||
{
|
||||
var ret = new float[] {float.MaxValue,float.MaxValue,float.MaxValue,
|
||||
float.MinValue,float.MinValue,float.MinValue};
|
||||
var ret = new float[] { float.MaxValue, float.MaxValue, float.MaxValue,
|
||||
float.MinValue, float.MinValue, float.MinValue };
|
||||
|
||||
for (uint j = 0; j < Limbs; j++)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ namespace OpenRA.Graphics
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
ret[i] = Math.Min(ret[i], bb[i]);
|
||||
ret[i+3] = Math.Max(ret[i+3], bb[i+3]);
|
||||
ret[i + 3] = Math.Max(ret[i + 3], bb[i + 3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user