Make sure braces for multi-line statements are on their own lines.

This commit is contained in:
Paul Chote
2019-06-08 15:04:36 +01:00
committed by reaperrr
parent c89f8dbb89
commit ebf2ce32c0
34 changed files with 180 additions and 91 deletions

View File

@@ -34,7 +34,8 @@ namespace OpenRA.Mods.Cnc.Activities
if (spriteOverlay != null && !spriteOverlay.Visible)
{
spriteOverlay.Visible = true;
spriteOverlay.WithOffset.Animation.PlayThen(spriteOverlay.Info.Sequence, () => {
spriteOverlay.WithOffset.Animation.PlayThen(spriteOverlay.Info.Sequence, () =>
{
dockingState = DockingState.Loop;
spriteOverlay.Visible = false;
});
@@ -52,7 +53,8 @@ namespace OpenRA.Mods.Cnc.Activities
if (spriteOverlay != null && !spriteOverlay.Visible)
{
spriteOverlay.Visible = true;
spriteOverlay.WithOffset.Animation.PlayBackwardsThen(spriteOverlay.Info.Sequence, () => {
spriteOverlay.WithOffset.Animation.PlayBackwardsThen(spriteOverlay.Info.Sequence, () =>
{
dockingState = DockingState.Complete;
body.Docked = false;
spriteOverlay.Visible = false;

View File

@@ -130,7 +130,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
return i;
}
uint[] lookupMfromP = new uint[] {
uint[] lookupMfromP =
{
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
@@ -138,7 +139,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
0x9216d5d9, 0x8979fb1b
};
uint[,] lookupMfromS = new uint[,] {
uint[,] lookupMfromS =
{
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,

View File

@@ -66,7 +66,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
z += count;
l.VoxelCount += count;
s.Seek(2 * count + 1, SeekOrigin.Current);
} while (z < l.Size[2]);
}
while (z < l.Size[2]);
}
// Read the data
@@ -99,7 +100,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
// Skip duplicate count
s.ReadUInt8();
} while (z < l.Size[2]);
}
while (z < l.Size[2]);
}
}

View File

@@ -101,18 +101,21 @@ namespace OpenRA.Mods.Cnc.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.MaxValue, float.MaxValue, float.MaxValue,
float.MinValue, float.MinValue, float.MinValue
};
for (uint j = 0; j < limbs; j++)
{
var l = limbData[j];
var b = new float[]
var b = new[]
{
0, 0, 0,
(l.Bounds[3] - l.Bounds[0]),
(l.Bounds[4] - l.Bounds[1]),
(l.Bounds[5] - l.Bounds[2])
l.Bounds[3] - l.Bounds[0],
l.Bounds[4] - l.Bounds[1],
l.Bounds[5] - l.Bounds[2]
};
// Calculate limb bounding box

View File

@@ -206,12 +206,19 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
static readonly Dictionary<byte, byte[]> ResourceFromOverlay = new Dictionary<byte, byte[]>()
{
// "tib" - Regular Tiberium
{ 0x01, new byte[] { 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 }
{
0x01, new byte[]
{
0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79
}
},
// "btib" - Blue Tiberium
{ 0x02, new byte[] { 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
{
0x02, new byte[]
{
0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
// Should be "tib2"
0x7F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88,
@@ -219,7 +226,8 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
// Should be "tib3"
0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C,
0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6 }
0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6
}
},
// Veins