Fix some spellings.
This commit is contained in:
@@ -704,7 +704,7 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
|
||||
// Mirrors DescriptionAttribute from System.ComponentModel but we don't want to have to use that everywhere.
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public sealed class DescAttribute : Attribute
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA.FileFormats
|
||||
var coded = br.ReadBits(8);
|
||||
|
||||
if (coded < 0 || coded > 1)
|
||||
throw new NotImplementedException("Invalid datastream");
|
||||
throw new NotImplementedException("Invalid data stream");
|
||||
var encodedLiterals = coded == 1;
|
||||
|
||||
// log2(dictionary size) - 6
|
||||
@@ -160,7 +160,7 @@ namespace OpenRA.FileFormats
|
||||
return ms.ToArray();
|
||||
}
|
||||
|
||||
// Decode a code using huffman table h.
|
||||
// Decode a code using Huffman table h.
|
||||
static int Decode(Huffman h, BitReader br)
|
||||
{
|
||||
var code = 0; // len bits being decoded
|
||||
|
||||
@@ -111,11 +111,11 @@ namespace OpenRA.FileFormats
|
||||
|
||||
/// <summary>
|
||||
/// A fast (native) CRC32 implementation that can be used on a pinned byte array using
|
||||
/// default polynomal.
|
||||
/// default polynomial.
|
||||
/// </summary>
|
||||
/// <param name="data"> [in,out] If non-null, the.</param>
|
||||
/// <param name="len"> The length of the data data.</param>
|
||||
/// <param name="polynomial">The polynomal to xor with.</param>
|
||||
/// <param name="len"> The length of the data.</param>
|
||||
/// <param name="polynomial">The polynomial to XOR with.</param>
|
||||
/// <returns>The calculated checksum.</returns>
|
||||
public static unsafe uint Calculate(byte* data, uint len, uint polynomial)
|
||||
{
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace OpenRA.FileFormats
|
||||
if (bitDepth == 8 && colorType == (PngColorType.Indexed | PngColorType.Color))
|
||||
return PixelFormat.Format8bppIndexed;
|
||||
|
||||
throw new InvalidDataException("Unknown pixelformat");
|
||||
throw new InvalidDataException("Unknown pixel format");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,7 +468,7 @@ namespace OpenRA.FileSystem
|
||||
return GetContentById(fileDes.LinkToPrevious);
|
||||
|
||||
if ((fileDes.Flags & FileObfuscated) != 0)
|
||||
throw new NotImplementedException("Haven't implemented obfustcated files");
|
||||
throw new NotImplementedException("Haven't implemented obfuscated files");
|
||||
|
||||
var output = new MemoryStream((int)fileDes.ExpandedSize);
|
||||
|
||||
@@ -495,7 +495,7 @@ namespace OpenRA.FileSystem
|
||||
}
|
||||
|
||||
if ((fileDes.Flags & FileObfuscated) != 0)
|
||||
throw new NotImplementedException("Haven't implemented obfustcated files");
|
||||
throw new NotImplementedException("Haven't implemented obfuscated files");
|
||||
|
||||
using (var reader = new CabReader(fileDes, index, commonName))
|
||||
reader.CopyTo(output);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.FileSystem
|
||||
this.priority = priority;
|
||||
try
|
||||
{
|
||||
// pull the file into memory, dont keep it open.
|
||||
// Pull the file into memory, don't keep it open.
|
||||
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
|
||||
}
|
||||
catch (ZipException e)
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.FileSystem
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new zip with the specified contents
|
||||
// Create a new zip with the specified contents.
|
||||
public ZipFile(string filename, int priority, Dictionary<string, byte[]> contents)
|
||||
{
|
||||
this.priority = priority;
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace OpenRA
|
||||
public static event Action OnQuit = () => { };
|
||||
|
||||
// Note: These delayed actions should only be used by widgets or disposing objects
|
||||
// - things that depend on a particular world should be queuing them on the worldactor.
|
||||
// - things that depend on a particular world should be queuing them on the world actor.
|
||||
static volatile ActionQueue delayedActions = new ActionQueue();
|
||||
public static void RunAfterTick(Action a) { delayedActions.Add(a, Game.RunTime); }
|
||||
public static void RunAfterDelay(int delayMilliseconds, Action a) { delayedActions.Add(a, Game.RunTime + delayMilliseconds); }
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA
|
||||
/// The actor name can be anything, but the sprites used in the Render*: traits default to this one.
|
||||
/// If you add an ^ in front of the name, the engine will recognize this as a collection of traits
|
||||
/// that can be inherited by others (using Inherits:) and not a real unit.
|
||||
/// You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.
|
||||
/// You can remove inherited traits by adding a - in front of them as in -TraitName: to inherit everything, but this trait.
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
readonly TypeDictionary traits = new TypeDictionary();
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace OpenRA.Graphics
|
||||
screenCorners[j] = new float2(corners[j][0], corners[j][1]);
|
||||
}
|
||||
|
||||
// Shadows are rendered at twice the resolution to reduce artefacts
|
||||
// Shadows are rendered at twice the resolution to reduce artifacts
|
||||
Size spriteSize, shadowSpriteSize;
|
||||
int2 spriteOffset, shadowSpriteOffset;
|
||||
CalculateSpriteGeometry(tl, br, 1, out spriteSize, out spriteOffset);
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace OpenRA
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Write("debug", "An exception occured while trying to load mod {0}:", mod);
|
||||
Log.Write("debug", "An exception occurred while trying to load mod {0}:", mod);
|
||||
Log.Write("debug", ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1222,7 +1222,7 @@ namespace OpenRA
|
||||
return result;
|
||||
|
||||
// If the lengths are equal, use other means to sort them.
|
||||
// Try the hashcode first because it gives more
|
||||
// Try the hash code first because it gives more
|
||||
// random-appearing results than X or Y that would always
|
||||
// prefer the leftmost/topmost position.
|
||||
result = a.GetHashCode().CompareTo(b.GetHashCode());
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace OpenRA
|
||||
|
||||
LoadTranslations(map);
|
||||
|
||||
// Reinit all our assets
|
||||
// Reinitialize all our assets
|
||||
InitializeLoaders();
|
||||
GlobalFileSystem.LoadFromManifest(Manifest);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenRA
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("An exception occured when trying to load ModMetadata for `{0}`:".F(m));
|
||||
Console.WriteLine("An exception occurred when trying to load ModMetadata for `{0}`:".F(m));
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
// NOTE(jsd): Poll the socket first to see if there's anything there.
|
||||
// Poll the socket first to see if there's anything there.
|
||||
// This avoids the exception with SocketErrorCode == `SocketError.WouldBlock` thrown
|
||||
// from `socket.Receive(rx)`.
|
||||
if (!Socket.Poll(0, SelectMode.SelectRead)) break;
|
||||
@@ -64,7 +64,7 @@ namespace OpenRA.Server
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
// NOTE(jsd): This should no longer be needed with the socket.Poll call above.
|
||||
// This should no longer be needed with the socket.Poll call above.
|
||||
if (e.SocketErrorCode == SocketError.WouldBlock) break;
|
||||
|
||||
server.DropClient(this);
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace OpenRA.Server
|
||||
catch (Exception e)
|
||||
{
|
||||
/* TODO: Could have an exception here when listener 'goes away' when calling AcceptConnection! */
|
||||
/* Alternative would be to use locking but the listener doesnt go away without a reason. */
|
||||
/* Alternative would be to use locking but the listener doesn't go away without a reason. */
|
||||
Log.Write("server", "Accepting the connection failed.", e);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA
|
||||
|
||||
public bool NatDeviceAvailable = false; // internal check if discovery succeeded
|
||||
|
||||
[Desc("Time in miliseconds to search for UPnP enabled NAT devices.")]
|
||||
[Desc("Time in milliseconds to search for UPnP enabled NAT devices.")]
|
||||
public int NatDiscoveryTimeout = 1000;
|
||||
|
||||
[Desc("Print very detailed logs for debugging issues with routers.")]
|
||||
@@ -60,7 +60,7 @@ namespace OpenRA
|
||||
[Desc("Takes a comma separated list of IP addresses that are not allowed to join.")]
|
||||
public string[] Ban = { };
|
||||
|
||||
[Desc("Value in miliseconds when to terminate the game. Needs to be at least 10000 (10 s) to enable the timer.")]
|
||||
[Desc("Value in milliseconds when to terminate the game. Needs to be at least 10000 (10 s) to enable the timer.")]
|
||||
public int TimeOut = 0;
|
||||
|
||||
[Desc("Run in headless mode with an empty renderer and without sound output.")]
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA
|
||||
{
|
||||
ChannelInfo info;
|
||||
if (!Channels.TryGetValue(channel, out info))
|
||||
throw new Exception("Tried logging to non-existant channel " + channel);
|
||||
throw new Exception("Tried logging to non-existent channel " + channel);
|
||||
|
||||
if (info.Writer == null)
|
||||
return;
|
||||
@@ -77,7 +77,7 @@ namespace OpenRA
|
||||
{
|
||||
ChannelInfo info;
|
||||
if (!Channels.TryGetValue(channel, out info))
|
||||
throw new Exception("Tried logging to non-existant channel " + channel);
|
||||
throw new Exception("Tried logging to non-existent channel " + channel);
|
||||
|
||||
if (info.Writer == null)
|
||||
return;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Traits
|
||||
[Desc("This is the internal name for owner checks.")]
|
||||
public readonly string InternalName = null;
|
||||
|
||||
[Desc("Pick a random faction as the player's facton out of this list.")]
|
||||
[Desc("Pick a random faction as the player's faction out of this list.")]
|
||||
public readonly HashSet<string> RandomFactionMembers = new HashSet<string>();
|
||||
|
||||
[Desc("The side that the faction belongs to. For example, England belongs to the 'Allies' side.")]
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA
|
||||
// 1 sample produces a rectangular probability
|
||||
// 2 samples produces a triangular probability
|
||||
// ...
|
||||
// N samples approximates a true gaussian
|
||||
// N samples approximates a true Gaussian
|
||||
public static WDist FromPDF(MersenneTwister r, int samples)
|
||||
{
|
||||
return new WDist(Exts.MakeArray(samples, _ => r.Next(-1024, 1024))
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenRA
|
||||
// Theoretically 1024 * * 2, but may differ slightly due to rounding
|
||||
var lsq = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3];
|
||||
|
||||
// Quarternion components use 10 bits, so there's no risk of overflow
|
||||
// Quaternion components use 10 bits, so there's no risk of overflow
|
||||
var mtx = new int[16];
|
||||
mtx[0] = lsq - 2 * (q[1] * q[1] + q[2] * q[2]);
|
||||
mtx[1] = 2 * (q[0] * q[1] + q[2] * q[3]);
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace OpenRA
|
||||
// 1 sample produces a rectangular probability
|
||||
// 2 samples produces a triangular probability
|
||||
// ...
|
||||
// N samples approximates a true gaussian
|
||||
// N samples approximates a true Gaussian
|
||||
public static WVec FromPDF(MersenneTwister r, int samples)
|
||||
{
|
||||
return new WVec(WDist.FromPDF(r, samples), WDist.FromPDF(r, samples), WDist.Zero);
|
||||
|
||||
Reference in New Issue
Block a user