public void Load(Collection[,] StaticMap, string iFilename) { XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); XmlElement xmlElement1 = (XmlElement) xmlDocument.SelectSingleNode("//Static_Tiles"); try { foreach (XmlElement xmlElement2 in xmlElement1.SelectNodes("Tile")) { short iTileID = XmlConvert.ToInt16(xmlElement2.GetAttribute("TileID")); short num1 = XmlConvert.ToInt16(xmlElement2.GetAttribute("X")); short num2 = XmlConvert.ToInt16(xmlElement2.GetAttribute("Y")); short iZ = XmlConvert.ToInt16(xmlElement2.GetAttribute("Z")); short iHue = XmlConvert.ToInt16(xmlElement2.GetAttribute("Hue")); StaticCell staticCell = new StaticCell(iTileID, checked ((byte) unchecked ((int) num1 % 8)), checked ((byte) unchecked ((int) num2 % 8)), iZ, iHue); StaticMap[(int) (short) ((int) num1 >> 3), (int) (short) ((int) num2 >> 3)].Add((object) staticCell, (string) null, (object) null, (object) null); } } finally { IEnumerator enumerator; if (enumerator is IDisposable) ((IDisposable) enumerator).Dispose(); } } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int) Interaction.MsgBox((object) ("Can not find:" + iFilename), MsgBoxStyle.OKOnly, (object) null); ProjectData.ClearProjectError(); } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { try { foreach (RandomStatic randomStatic in this.InnerList) { StaticCell staticCell = new StaticCell(randomStatic.TileID, checked ((byte)unchecked ((int)checked ((short)unchecked ((int)X + (int)randomStatic.X)) % 8)), checked ((byte)unchecked ((int)checked ((short)unchecked ((int)Y + (int)randomStatic.Y)) % 8)), checked ((short)unchecked ((int)Z + (int)randomStatic.Z))); StaticMap[(int)(short)((int)checked ((short)unchecked ((int)X + (int)randomStatic.X)) >> 3), (int)(short)((int)checked ((short)unchecked ((int)Y + (int)randomStatic.Y)) >> 3)].Add((object)staticCell, (string)null, (object)null, (object)null); } } finally { IEnumerator enumerator; if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { IEnumerator enumerator = this.InnerList.GetEnumerator(); try { while (enumerator.MoveNext()) { RandomStatic randomStatic = (RandomStatic)enumerator.Current; StaticCell item = new StaticCell(randomStatic.TileID, checked ((byte)(unchecked (X + randomStatic.X) % 8)), checked ((byte)(unchecked (Y + randomStatic.Y) % 8)), (short)(Z + randomStatic.Z)); StaticMap[(int)((short)(X + randomStatic.X >> 3)), (int)((short)(Y + randomStatic.Y >> 3))].Add(item, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }
public void Load(Collection[,] StaticMap, string iFilename) { XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles"); IEnumerator enumerator = xmlElement.SelectNodes("Tile").GetEnumerator(); try { while (enumerator.MoveNext()) { XmlElement xmlElement2 = (XmlElement)enumerator.Current; short iTileID = XmlConvert.ToInt16(xmlElement2.GetAttribute("TileID")); short num = XmlConvert.ToInt16(xmlElement2.GetAttribute("X")); short num2 = XmlConvert.ToInt16(xmlElement2.GetAttribute("Y")); short iZ = XmlConvert.ToInt16(xmlElement2.GetAttribute("Z")); short iHue = XmlConvert.ToInt16(xmlElement2.GetAttribute("Hue")); StaticCell item = checked (new StaticCell(iTileID, (byte)(num % 8), (byte)(num2 % 8), iZ, iHue)); StaticMap[(int)((short)(num >> 3)), (int)((short)(num2 >> 3))].Add(item, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } } catch (Exception expr_FB) { ProjectData.SetProjectError(expr_FB); Interaction.MsgBox("Can not find:" + iFilename, MsgBoxStyle.OkOnly, null); ProjectData.ClearProjectError(); } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { IEnumerator enumerator = null; try { enumerator = this.InnerList.GetEnumerator(); while (enumerator.MoveNext()) { RandomStatic current = (RandomStatic)enumerator.Current; StaticCell staticCell = new StaticCell(current.TileID, checked ((byte)(checked ((short)(X + current.X)) % 8)), checked ((byte)(checked ((short)(Y + current.Y)) % 8)), checked ((short)(Z + current.Z))); StaticMap[(short)(checked ((short)(X + current.X)) >> 3), (short)(checked ((short)(Y + current.Y)) >> 3)].Add(staticCell, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }
public void Load(Collection[,] StaticMap, string iFilename) { IEnumerator enumerator = null; XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles"); try { enumerator = xmlElement.SelectNodes("Tile").GetEnumerator(); while (enumerator.MoveNext()) { XmlElement current = (XmlElement)enumerator.Current; short num = XmlConvert.ToInt16(current.GetAttribute("TileID")); short num1 = XmlConvert.ToInt16(current.GetAttribute("X")); short num2 = XmlConvert.ToInt16(current.GetAttribute("Y")); short num3 = XmlConvert.ToInt16(current.GetAttribute("Z")); short num4 = XmlConvert.ToInt16(current.GetAttribute("Hue")); StaticCell staticCell = new StaticCell(num, checked ((byte)(num1 % 8)), checked ((byte)(num2 % 8)), num3, num4); StaticMap[(short)(num1 >> 3), (short)(num2 >> 3)].Add(staticCell, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } } catch (Exception exception) { ProjectData.SetProjectError(exception); Interaction.MsgBox(string.Concat("Can not find:", iFilename), MsgBoxStyle.OKOnly, null); ProjectData.ClearProjectError(); } }
public void Load(Collection[,] StaticMap, string iFilename) { IEnumerator enumerator = null; XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); XmlElement xmlElement = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles"); try { enumerator = xmlElement.SelectNodes("Tile").GetEnumerator(); while (enumerator.MoveNext()) { XmlElement current = (XmlElement)enumerator.Current; short num = XmlConvert.ToInt16(current.GetAttribute("TileID")); short num1 = XmlConvert.ToInt16(current.GetAttribute("X")); short num2 = XmlConvert.ToInt16(current.GetAttribute("Y")); short num3 = XmlConvert.ToInt16(current.GetAttribute("Z")); short num4 = XmlConvert.ToInt16(current.GetAttribute("Hue")); StaticCell staticCell = new StaticCell(num, checked((byte)(num1 % 8)), checked((byte)(num2 % 8)), num3, num4); StaticMap[(short)(num1 >> 3), (short)(num2 >> 3)].Add(staticCell, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } } catch (Exception exception) { ProjectData.SetProjectError(exception); Interaction.MsgBox(string.Concat("Can not find:", iFilename), MsgBoxStyle.OKOnly, null); ProjectData.ClearProjectError(); } }
public void Load(Collection[,] StaticMap, string iFilename) { XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); XmlElement xmlElement1 = (XmlElement)xmlDocument.SelectSingleNode("//Static_Tiles"); try { foreach (XmlElement xmlElement2 in xmlElement1.SelectNodes("Tile")) { short iTileID = XmlConvert.ToInt16(xmlElement2.GetAttribute("TileID")); short num1 = XmlConvert.ToInt16(xmlElement2.GetAttribute("X")); short num2 = XmlConvert.ToInt16(xmlElement2.GetAttribute("Y")); short iZ = XmlConvert.ToInt16(xmlElement2.GetAttribute("Z")); short iHue = XmlConvert.ToInt16(xmlElement2.GetAttribute("Hue")); StaticCell staticCell = new StaticCell(iTileID, checked ((byte)unchecked ((int)num1 % 8)), checked ((byte)unchecked ((int)num2 % 8)), iZ, iHue); StaticMap[(int)(short)((int)num1 >> 3), (int)(short)((int)num2 >> 3)].Add((object)staticCell, (string)null, (object)null, (object)null); } } finally { IEnumerator enumerator; if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } } catch (Exception ex) { ProjectData.SetProjectError(ex); int num = (int)Interaction.MsgBox((object)("Can not find:" + iFilename), MsgBoxStyle.OKOnly, (object)null); ProjectData.ClearProjectError(); } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { try { foreach (RandomStatic randomStatic in this.InnerList) { StaticCell staticCell = new StaticCell(randomStatic.TileID, checked ((byte) unchecked ((int) checked ((short) unchecked ((int) X + (int) randomStatic.X)) % 8)), checked ((byte) unchecked ((int) checked ((short) unchecked ((int) Y + (int) randomStatic.Y)) % 8)), checked ((short) unchecked ((int) Z + (int) randomStatic.Z))); StaticMap[(int) (short) ((int) checked ((short) unchecked ((int) X + (int) randomStatic.X)) >> 3), (int) (short) ((int) checked ((short) unchecked ((int) Y + (int) randomStatic.Y)) >> 3)].Add((object) staticCell, (string) null, (object) null, (object) null); } } finally { IEnumerator enumerator; if (enumerator is IDisposable) ((IDisposable) enumerator).Dispose(); } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { IEnumerator enumerator = this.InnerList.GetEnumerator(); try { while (enumerator.MoveNext()) { RandomStatic randomStatic = (RandomStatic)enumerator.Current; StaticCell item = new StaticCell(randomStatic.TileID, checked((byte)(unchecked(X + randomStatic.X) % 8)), checked((byte)(unchecked(Y + randomStatic.Y) % 8)), (short) (Z + randomStatic.Z)); StaticMap[(int)((short)(X + randomStatic.X >> 3)), (int)((short)(Y + randomStatic.Y >> 3))].Add(item, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }
public void RandomStatic(short X, short Y, short Z, Collection[,] StaticMap) { IEnumerator enumerator = null; try { enumerator = this.InnerList.GetEnumerator(); while (enumerator.MoveNext()) { RandomStatic current = (RandomStatic)enumerator.Current; StaticCell staticCell = new StaticCell(current.TileID, checked((byte)(checked((short)(X + current.X)) % 8)), checked((byte)(checked((short)(Y + current.Y)) % 8)), checked((short)(Z + current.Z))); StaticMap[(short)(checked((short)(X + current.X)) >> 3), (short)(checked((short)(Y + current.Y)) >> 3)].Add(staticCell, null, null, null); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }