@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Globalization;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
@@ -30,22 +31,22 @@ namespace OpenRA.Graphics
|
||||
sprites = Game.modData.SpriteLoader.LoadAllSprites(cursorSrc);
|
||||
var d = info.NodesDict;
|
||||
|
||||
start = int.Parse(d["start"].Value);
|
||||
start = int.Parse(d["start"].Value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo);
|
||||
this.palette = palette;
|
||||
|
||||
if ((d.ContainsKey("length") && d["length"].Value == "*") || (d.ContainsKey("end") && d["end"].Value == "*"))
|
||||
length = sprites.Length - start;
|
||||
else if (d.ContainsKey("length"))
|
||||
length = int.Parse(d["length"].Value);
|
||||
length = int.Parse(d["length"].Value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo);
|
||||
else if (d.ContainsKey("end"))
|
||||
length = int.Parse(d["end"].Value) - start;
|
||||
length = int.Parse(d["end"].Value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo) - start;
|
||||
else
|
||||
length = 1;
|
||||
|
||||
if (d.ContainsKey("x"))
|
||||
int.TryParse(d["x"].Value, out Hotspot.X);
|
||||
int.TryParse(d["x"].Value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out Hotspot.X);
|
||||
if (d.ContainsKey("y"))
|
||||
int.TryParse(d["y"].Value, out Hotspot.Y);
|
||||
int.TryParse(d["y"].Value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out Hotspot.Y);
|
||||
}
|
||||
|
||||
public Sprite GetSprite(int frame)
|
||||
|
||||
Reference in New Issue
Block a user