From f02bfbf0c2a6cb8944000675dac41ae9ccd48961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 16:32:26 +0200 Subject: [PATCH 01/23] disable StyleCop rules SA1115 and SA1116 closes #3562 --- OpenRA.Editor/Settings.StyleCop | 10 ++++++++++ OpenRA.FileFormats/Settings.StyleCop | 10 ++++++++++ OpenRA.Game/Settings.StyleCop | 10 ++++++++++ OpenRA.Mods.Cnc/Settings.StyleCop | 10 ++++++++++ OpenRA.Mods.D2k/Settings.StyleCop | 10 ++++++++++ OpenRA.Mods.RA/Settings.StyleCop | 10 ++++++++++ OpenRA.Renderer.Cg/Settings.StyleCop | 10 ++++++++++ OpenRA.Renderer.Embedded/Settings.StyleCop | 10 ++++++++++ OpenRA.Renderer.Gl/Settings.StyleCop | 10 ++++++++++ OpenRA.Renderer.Null/Settings.StyleCop | 10 ++++++++++ OpenRA.Renderer.SdlCommon/Settings.StyleCop | 10 ++++++++++ OpenRA.TilesetBuilder/Settings.StyleCop | 10 ++++++++++ OpenRA.Utility/Settings.StyleCop | 10 ++++++++++ 13 files changed, 130 insertions(+) diff --git a/OpenRA.Editor/Settings.StyleCop b/OpenRA.Editor/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Editor/Settings.StyleCop +++ b/OpenRA.Editor/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.FileFormats/Settings.StyleCop b/OpenRA.FileFormats/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.FileFormats/Settings.StyleCop +++ b/OpenRA.FileFormats/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Game/Settings.StyleCop b/OpenRA.Game/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Game/Settings.StyleCop +++ b/OpenRA.Game/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Mods.Cnc/Settings.StyleCop b/OpenRA.Mods.Cnc/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Mods.Cnc/Settings.StyleCop +++ b/OpenRA.Mods.Cnc/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Mods.D2k/Settings.StyleCop b/OpenRA.Mods.D2k/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Mods.D2k/Settings.StyleCop +++ b/OpenRA.Mods.D2k/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Mods.RA/Settings.StyleCop b/OpenRA.Mods.RA/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Mods.RA/Settings.StyleCop +++ b/OpenRA.Mods.RA/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Renderer.Cg/Settings.StyleCop b/OpenRA.Renderer.Cg/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Renderer.Cg/Settings.StyleCop +++ b/OpenRA.Renderer.Cg/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Renderer.Embedded/Settings.StyleCop b/OpenRA.Renderer.Embedded/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Renderer.Embedded/Settings.StyleCop +++ b/OpenRA.Renderer.Embedded/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Renderer.Gl/Settings.StyleCop b/OpenRA.Renderer.Gl/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Renderer.Gl/Settings.StyleCop +++ b/OpenRA.Renderer.Gl/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Renderer.Null/Settings.StyleCop b/OpenRA.Renderer.Null/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Renderer.Null/Settings.StyleCop +++ b/OpenRA.Renderer.Null/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Renderer.SdlCommon/Settings.StyleCop b/OpenRA.Renderer.SdlCommon/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Renderer.SdlCommon/Settings.StyleCop +++ b/OpenRA.Renderer.SdlCommon/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.TilesetBuilder/Settings.StyleCop b/OpenRA.TilesetBuilder/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.TilesetBuilder/Settings.StyleCop +++ b/OpenRA.TilesetBuilder/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + diff --git a/OpenRA.Utility/Settings.StyleCop b/OpenRA.Utility/Settings.StyleCop index 2e3436170c..1590d17baa 100644 --- a/OpenRA.Utility/Settings.StyleCop +++ b/OpenRA.Utility/Settings.StyleCop @@ -302,6 +302,16 @@ False + + + False + + + + + False + + From 7415b0ce231c43ffa4ac9211c7324e724ef07ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 16:32:34 +0200 Subject: [PATCH 02/23] StyleCop rules for Tiberian Sun --- OpenRA.Mods.TS/Settings.StyleCop | 344 +++++++++++++++++++++++++++++++ 1 file changed, 344 insertions(+) create mode 100644 OpenRA.Mods.TS/Settings.StyleCop diff --git a/OpenRA.Mods.TS/Settings.StyleCop b/OpenRA.Mods.TS/Settings.StyleCop new file mode 100644 index 0000000000..1590d17baa --- /dev/null +++ b/OpenRA.Mods.TS/Settings.StyleCop @@ -0,0 +1,344 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file From 79355bbb32949c95943e53a49341ab1f40c3a718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 7 Aug 2013 14:11:52 +0200 Subject: [PATCH 03/23] remove unused AssemblyInfos --- OpenRA.Editor/OpenRA.Editor.csproj | 1 - OpenRA.Editor/Properties/AssemblyInfo.cs | 46 ------------------- OpenRA.FileFormats/OpenRA.FileFormats.csproj | 1 - OpenRA.FileFormats/Properties/AssemblyInfo.cs | 26 ----------- OpenRA.Game/OpenRA.Game.csproj | 1 - OpenRA.Game/Properties/AssemblyInfo.cs | 27 ----------- OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj | 1 - OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs | 46 ------------------- OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj | 1 - OpenRA.Mods.D2k/Properties/AssemblyInfo.cs | 39 ---------------- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 - OpenRA.Mods.RA/Properties/AssemblyInfo.cs | 46 ------------------- OpenRA.Mods.TS/OpenRA.Mods.TS.csproj | 3 -- OpenRA.Mods.TS/Properties/AssemblyInfo.cs | 37 --------------- OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj | 1 - OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs | 46 ------------------- OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj | 1 - OpenRA.Renderer.Gl/Properties/AssemblyInfo.cs | 27 ----------- .../OpenRA.Renderer.Null.csproj | 1 - .../Properties/AssemblyInfo.cs | 46 ------------------- .../Properties/AssemblyInfo.cs | 36 --------------- OpenRA.Utility/OpenRA.Utility.csproj | 1 - OpenRA.Utility/Properties/AssemblyInfo.cs | 46 ------------------- RALint/Properties/AssemblyInfo.cs | 46 ------------------- RALint/RALint.csproj | 1 - 25 files changed, 528 deletions(-) delete mode 100644 OpenRA.Editor/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.FileFormats/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Game/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Mods.D2k/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Mods.RA/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Mods.TS/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Renderer.Gl/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Renderer.Null/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs delete mode 100644 OpenRA.Utility/Properties/AssemblyInfo.cs delete mode 100644 RALint/Properties/AssemblyInfo.cs diff --git a/OpenRA.Editor/OpenRA.Editor.csproj b/OpenRA.Editor/OpenRA.Editor.csproj index 48b017dcd5..166adf6e68 100644 --- a/OpenRA.Editor/OpenRA.Editor.csproj +++ b/OpenRA.Editor/OpenRA.Editor.csproj @@ -116,7 +116,6 @@ PropertiesDialog.cs - ActorPropertiesDialog.cs Designer diff --git a/OpenRA.Editor/Properties/AssemblyInfo.cs b/OpenRA.Editor/Properties/AssemblyInfo.cs deleted file mode 100644 index 89becad42b..0000000000 --- a/OpenRA.Editor/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Editor")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("OpenRA.Editor")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e18ea68f-f344-46c9-b026-8bda76fa91f8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.FileFormats/OpenRA.FileFormats.csproj b/OpenRA.FileFormats/OpenRA.FileFormats.csproj index cc3d2264c1..7ccec24b8b 100644 --- a/OpenRA.FileFormats/OpenRA.FileFormats.csproj +++ b/OpenRA.FileFormats/OpenRA.FileFormats.csproj @@ -126,7 +126,6 @@ - diff --git a/OpenRA.FileFormats/Properties/AssemblyInfo.cs b/OpenRA.FileFormats/Properties/AssemblyInfo.cs deleted file mode 100644 index 5495a0fa39..0000000000 --- a/OpenRA.FileFormats/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,26 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("OpenRA.FileFormats")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.FileFormats")] -[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index e16c3456d6..e3b4c1c2d7 100644 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -146,7 +146,6 @@ - diff --git a/OpenRA.Game/Properties/AssemblyInfo.cs b/OpenRA.Game/Properties/AssemblyInfo.cs deleted file mode 100644 index dfc5296618..0000000000 --- a/OpenRA.Game/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("OpenRA")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA")] -[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index ac48cabe2f..0a5263f48d 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -84,7 +84,6 @@ - diff --git a/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs b/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs deleted file mode 100644 index adf9bff76b..0000000000 --- a/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Mods.Cnc")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.Cnc")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3b31edcf-34e4-4a58-8130-88b15b046d10")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj index 2f41a168e2..4677860648 100644 --- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj +++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj @@ -77,7 +77,6 @@ - diff --git a/OpenRA.Mods.D2k/Properties/AssemblyInfo.cs b/OpenRA.Mods.D2k/Properties/AssemblyInfo.cs deleted file mode 100644 index d76af3c9e2..0000000000 --- a/OpenRA.Mods.D2k/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2012 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("OpenRA.Mods.D2k")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.D2k")] -[assembly: AssemblyCopyright("Copyright © 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 54a3cfd217..d56fd0fe6b 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -303,7 +303,6 @@ - diff --git a/OpenRA.Mods.RA/Properties/AssemblyInfo.cs b/OpenRA.Mods.RA/Properties/AssemblyInfo.cs deleted file mode 100644 index 42dfd22c6b..0000000000 --- a/OpenRA.Mods.RA/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Mods.RA")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.RA")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("23828b43-3536-4681-bc2f-2eb2e0972354")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj index 05f4869804..8642956d8b 100644 --- a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj +++ b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj @@ -36,9 +36,6 @@ - - - diff --git a/OpenRA.Mods.TS/Properties/AssemblyInfo.cs b/OpenRA.Mods.TS/Properties/AssemblyInfo.cs deleted file mode 100644 index 2edc84378f..0000000000 --- a/OpenRA.Mods.TS/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2013 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("OpenRA.Mods.TS")] -[assembly: AssemblyDescription("Tiberian Sun Mod")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.TS")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj index b70afc723f..7186e7810f 100644 --- a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj +++ b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj @@ -77,7 +77,6 @@ - diff --git a/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs b/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs deleted file mode 100644 index c9ffb260b8..0000000000 --- a/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Renderer.Cg")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("OpenRA.Renderer.Cg")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5531344c-b25d-4641-bc3c-fe035cc777bd")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj index 67376dd2cc..eeb08b83f7 100644 --- a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj +++ b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj @@ -75,7 +75,6 @@ - diff --git a/OpenRA.Renderer.Gl/Properties/AssemblyInfo.cs b/OpenRA.Renderer.Gl/Properties/AssemblyInfo.cs deleted file mode 100644 index ac5e1a30a3..0000000000 --- a/OpenRA.Renderer.Gl/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("OpenRA.Renderer.Gl")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj index 206aa93847..e6cf42a74f 100644 --- a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj +++ b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj @@ -69,7 +69,6 @@ - diff --git a/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs b/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs deleted file mode 100644 index 6bd6705fc4..0000000000 --- a/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Renderer.Null")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Renderer.Null")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c7dff231-d517-400e-bc98-ff10c99fd660")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs b/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs deleted file mode 100644 index 98243827bb..0000000000 --- a/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.TilesetBuilder")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.TilesetBuilder")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9efec6a6-74f7-4a7d-a509-aba2aae75bcc")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Utility/OpenRA.Utility.csproj b/OpenRA.Utility/OpenRA.Utility.csproj index d4b8cdf0c0..eeb83d59c1 100644 --- a/OpenRA.Utility/OpenRA.Utility.csproj +++ b/OpenRA.Utility/OpenRA.Utility.csproj @@ -76,7 +76,6 @@ - diff --git a/OpenRA.Utility/Properties/AssemblyInfo.cs b/OpenRA.Utility/Properties/AssemblyInfo.cs deleted file mode 100644 index a720f041a1..0000000000 --- a/OpenRA.Utility/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Utility")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA")] -[assembly: AssemblyCopyright("Copyright © 2010 The OpenRA Developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("64363ecc-4102-4a38-a108-427de0af5dcb")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RALint/Properties/AssemblyInfo.cs b/RALint/Properties/AssemblyInfo.cs deleted file mode 100644 index c378c83436..0000000000 --- a/RALint/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 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, - * see COPYING. - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RALint")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RALint")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("722ef098-e9f3-4e3c-b374-3388dfad8979")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RALint/RALint.csproj b/RALint/RALint.csproj index b758479c49..de6c32c3b8 100644 --- a/RALint/RALint.csproj +++ b/RALint/RALint.csproj @@ -71,7 +71,6 @@ - From 1cd3a97772ec7a318443231b80538f0ecb93c32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 7 Aug 2013 14:05:11 +0200 Subject: [PATCH 04/23] Tiberian Sun Loadscreen we need at least one file to get the DLL built --- OpenRA.Mods.TS/OpenRA.Mods.TS.csproj | 4 ++ OpenRA.Mods.TS/TSLoadScreen.cs | 92 ++++++++++++++++++++++++++++ mods/ts/mod.yaml | 2 +- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 OpenRA.Mods.TS/TSLoadScreen.cs diff --git a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj index 8642956d8b..ac5fbd4237 100644 --- a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj +++ b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj @@ -35,6 +35,7 @@ + @@ -51,4 +52,7 @@ OpenRA.FileFormats + + + \ No newline at end of file diff --git a/OpenRA.Mods.TS/TSLoadScreen.cs b/OpenRA.Mods.TS/TSLoadScreen.cs new file mode 100644 index 0000000000..bfb726866d --- /dev/null +++ b/OpenRA.Mods.TS/TSLoadScreen.cs @@ -0,0 +1,92 @@ +#region Copyright & License Information +/* + * Copyright 2007-2011 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, + * see COPYING. + */ +#endregion + +using System.Collections.Generic; +using System.Drawing; +using OpenRA.FileFormats; +using OpenRA.Graphics; +using OpenRA.Network; +using OpenRA.Support; +using OpenRA.Widgets; + +namespace OpenRA.Mods.TS +{ + public class TSLoadScreen : ILoadScreen + { + Dictionary Info; + static string[] Comments = new[] { "Updating EVA installation..." }; + + Stopwatch lastLoadScreen = new Stopwatch(); + Rectangle StripeRect; + Sprite Stripe, Logo; + float2 LogoPos; + + Renderer r; + public void Init(Dictionary info) + { + Info = info; + // Avoid standard loading mechanisms so we + // can display loadscreen as early as possible + r = Game.Renderer; + if (r == null) return; + + var s = new Sheet(Info["LoadScreenImage"]); + Logo = new Sprite(s, new Rectangle(0,0,256,256), TextureChannel.Alpha); + Stripe = new Sprite(s, new Rectangle(256,0,256,256), TextureChannel.Alpha); + StripeRect = new Rectangle(0, Renderer.Resolution.Height/2 - 128, Renderer.Resolution.Width, 256); + LogoPos = new float2(Renderer.Resolution.Width/2 - 128, Renderer.Resolution.Height/2 - 128); + } + + public void Display() + { + if (r == null) + return; + + // Update text at most every 0.5 seconds + if (lastLoadScreen.ElapsedTime() < 0.5) + return; + + if (r.Fonts == null) + return; + + lastLoadScreen.Reset(); + var text = Comments.Random(Game.CosmeticRandom); + var textSize = r.Fonts["Bold"].Measure(text); + + r.BeginFrame(float2.Zero, 1f); + WidgetUtils.FillRectWithSprite(StripeRect, Stripe); + r.RgbaSpriteRenderer.DrawSprite(Logo, LogoPos); + r.Fonts["Bold"].DrawText(text, new float2(Renderer.Resolution.Width - textSize.X - 20, Renderer.Resolution.Height - textSize.Y - 20), Color.White); + r.EndFrame( new NullInputHandler() ); + } + + public void StartGame() + { + TestAndContinue(); + } + + void TestAndContinue() + { + Ui.ResetAll(); + if (!FileSystem.Exists(Info["TestFile"])) + { + var args = new WidgetArgs() + { + { "continueLoading", () => TestAndContinue() }, + { "installData", Info } + }; + Ui.OpenWindow(Info["InstallerMenuWidget"], args); + } + else + Game.LoadShellMap(); + } + } +} + diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 77c15fb7c3..cd6028d999 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -132,7 +132,7 @@ Music: Movies: -LoadScreen: RALoadScreen +LoadScreen: TSLoadScreen LoadScreenImage: mods/ts/uibits/loadscreen.png InstallerMenuWidget: INSTALL_PANEL TestFile: tibsun.mix From 040e8eccd9f3e844339b9b236b86fa32a6ec02fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 7 Aug 2013 14:12:12 +0200 Subject: [PATCH 05/23] StyleCop clean D2k Mod DLL --- .../BuildingCaptureNotification.cs | 11 +- OpenRA.Mods.D2k/D2kLoadScreen.cs | 27 +- .../Widgets/Logic/D2kDownloadPackagesLogic.cs | 6 +- .../Widgets/Logic/D2kExtractGameFilesLogic.cs | 1305 +++++++++-------- .../Widgets/Logic/D2kInstallFromCDLogic.cs | 16 +- .../Widgets/Logic/D2kInstallLogic.cs | 7 +- 6 files changed, 686 insertions(+), 686 deletions(-) diff --git a/OpenRA.Mods.D2k/BuildingCaptureNotification.cs b/OpenRA.Mods.D2k/BuildingCaptureNotification.cs index e23746d7f4..164eaced05 100644 --- a/OpenRA.Mods.D2k/BuildingCaptureNotification.cs +++ b/OpenRA.Mods.D2k/BuildingCaptureNotification.cs @@ -21,19 +21,18 @@ namespace OpenRA.Mods.RA class CaptureNotification : INotifyCapture { - CaptureNotificationInfo Info; + CaptureNotificationInfo captureInfo; public CaptureNotification(CaptureNotificationInfo info) { - Info = info; + captureInfo = info; } - public void OnCapture (Actor self, Actor captor, Player oldOwner, Player newOwner) + public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner) { if (captor.World.LocalPlayer != captor.Owner) return; - Sound.PlayNotification(captor.World.LocalPlayer, "Speech", Info.Notification, newOwner.Country.Race); + Sound.PlayNotification(captor.World.LocalPlayer, "Speech", captureInfo.Notification, newOwner.Country.Race); } } -} - +} \ No newline at end of file diff --git a/OpenRA.Mods.D2k/D2kLoadScreen.cs b/OpenRA.Mods.D2k/D2kLoadScreen.cs index cef13195fe..8183238456 100644 --- a/OpenRA.Mods.D2k/D2kLoadScreen.cs +++ b/OpenRA.Mods.D2k/D2kLoadScreen.cs @@ -9,8 +9,8 @@ #endregion using System.Collections.Generic; -using System.IO; using System.Drawing; +using System.IO; using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Network; @@ -21,27 +21,28 @@ namespace OpenRA.Mods.D2k { public class D2kLoadScreen : ILoadScreen { - Dictionary Info; - static string[] Comments = new[] {"Filling Crates...", "Breeding Sandworms..."}; + public static string[] Comments = new[] { "Filling Crates...", "Breeding Sandworms..." }; + public Dictionary Info; Stopwatch lastLoadScreen = new Stopwatch(); - Rectangle StripeRect; - Sprite Stripe, Logo; - float2 LogoPos; + Rectangle stripeRect; + Sprite stripe, Logo; + float2 logoPos; Renderer r; public void Init(Dictionary info) { Info = info; + // Avoid standard loading mechanisms so we // can display loadscreen as early as possible r = Game.Renderer; if (r == null) return; var s = new Sheet("mods/d2k/uibits/loadscreen.png"); - Logo = new Sprite(s, new Rectangle(0,0,256,256), TextureChannel.Alpha); - Stripe = new Sprite(s, new Rectangle(256,0,256,256), TextureChannel.Alpha); - StripeRect = new Rectangle(0, Renderer.Resolution.Height/2 - 128, Renderer.Resolution.Width, 256); - LogoPos = new float2(Renderer.Resolution.Width/2 - 128, Renderer.Resolution.Height/2 - 128); + Logo = new Sprite(s, new Rectangle(0, 0, 256, 256), TextureChannel.Alpha); + stripe = new Sprite(s, new Rectangle(256, 0, 256, 256), TextureChannel.Alpha); + stripeRect = new Rectangle(0, Renderer.Resolution.Height / 2 - 128, Renderer.Resolution.Width, 256); + logoPos = new float2(Renderer.Resolution.Width / 2 - 128, Renderer.Resolution.Height / 2 - 128); } public void Display() @@ -61,10 +62,10 @@ namespace OpenRA.Mods.D2k var textSize = r.Fonts["Bold"].Measure(text); r.BeginFrame(float2.Zero, 1f); - WidgetUtils.FillRectWithSprite(StripeRect, Stripe); - r.RgbaSpriteRenderer.DrawSprite(Logo, LogoPos); + WidgetUtils.FillRectWithSprite(stripeRect, stripe); + r.RgbaSpriteRenderer.DrawSprite(Logo, logoPos); r.Fonts["Bold"].DrawText(text, new float2(Renderer.Resolution.Width - textSize.X - 20, Renderer.Resolution.Height - textSize.Y - 20), Color.White); - r.EndFrame( new NullInputHandler() ); + r.EndFrame(new NullInputHandler()); } public void StartGame() diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kDownloadPackagesLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kDownloadPackagesLogic.cs index ff982effce..a515dc8801 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kDownloadPackagesLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kDownloadPackagesLogic.cs @@ -22,13 +22,13 @@ namespace OpenRA.Mods.D2k.Widgets.Logic public class D2kDownloadPackagesLogic { Widget panel; - Dictionary installData; + Dictionary installData; ProgressBarWidget progressBar; LabelWidget statusLabel; Action afterInstall; [ObjectCreator.UseCtor] - public D2kDownloadPackagesLogic(Widget widget, Dictionary installData, Action afterInstall) + public D2kDownloadPackagesLogic(Widget widget, Dictionary installData, Action afterInstall) { this.installData = installData; this.afterInstall = afterInstall; @@ -71,7 +71,7 @@ namespace OpenRA.Mods.D2k.Widgets.Logic { Game.RunAfterTick(() => { - statusLabel.GetText = () => "Error: "+s; + statusLabel.GetText = () => "Error: " + s; retryButton.IsVisible = () => true; }); }; diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs index 78f471c2ee..ca5f3fbc17 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs @@ -9,14 +9,14 @@ #endregion using System; +using System.Diagnostics; using System.IO; using System.Linq; using System.Threading; -using System.Diagnostics; using OpenRA.FileFormats; using OpenRA.FileFormats.Graphics; -using OpenRA.Widgets; using OpenRA.Utility; +using OpenRA.Widgets; namespace OpenRA.Mods.D2k.Widgets.Logic { @@ -56,676 +56,676 @@ namespace OpenRA.Mods.D2k.Widgets.Logic copyFilesContainer.IsVisible = () => false; extractingContainer.IsVisible = () => true; - var PathToDataR8 = Path.Combine(Platform.SupportDir, "Content/d2k/DATA.R8"); - var PathToPalette = "mods/d2k/bits/d2k.pal"; - var PathToSHPs = Path.Combine(Platform.SupportDir, "Content/d2k/SHPs"); - var PathToTilesets = Path.Combine(Platform.SupportDir, "Content/d2k/Tilesets"); + var pathToDataR8 = Path.Combine(Platform.SupportDir, "Content/d2k/DATA.R8"); + var pathToPalette = "mods/d2k/bits/d2k.pal"; + var pathToSHPs = Path.Combine(Platform.SupportDir, "Content/d2k/SHPs"); + var pathToTilesets = Path.Combine(Platform.SupportDir, "Content/d2k/Tilesets"); - var ExtractGameFiles = new string[][] + var extractGameFiles = new string[][] { - new string[] {"--r8", PathToDataR8, PathToPalette, "0", "2", Path.Combine(PathToSHPs, "overlay")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3", "3", Path.Combine(PathToSHPs, "repairing")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4", "4", Path.Combine(PathToSHPs, "black")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "5", "8", Path.Combine(PathToSHPs, "selectionedges")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "9", "9", Path.Combine(PathToSHPs, "bar1")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "10", "10", Path.Combine(PathToSHPs, "bar2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "11", "11", Path.Combine(PathToSHPs, "bar3")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "12", "12", Path.Combine(PathToSHPs, "bar4")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "13", "13", Path.Combine(PathToSHPs, "bar5")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "14", "14", Path.Combine(PathToSHPs, "bar6")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "15", "16", Path.Combine(PathToSHPs, "dots")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "17", "26", Path.Combine(PathToSHPs, "numbers")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "27", "37", Path.Combine(PathToSHPs, "credits")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "40", "101", Path.Combine(PathToSHPs, "d2kshadow")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "102", "105", Path.Combine(PathToSHPs, "crates")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "107", "109", Path.Combine(PathToSHPs, "spicebloom")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "110", "111", Path.Combine(PathToSHPs, "stars")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "112", "113", Path.Combine(PathToSHPs, "greenuparrow")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "114", "129", Path.Combine(PathToSHPs, "rockcrater1")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "130", "145", Path.Combine(PathToSHPs, "rockcrater2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "146", "161", Path.Combine(PathToSHPs, "sandcrater1")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "162", "177", Path.Combine(PathToSHPs, "sandcrater2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "178", "193", Path.Combine(PathToSHPs, "unknown")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "194", "205", Path.Combine(PathToSHPs, "unknown2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "206", "381", Path.Combine(PathToSHPs, "rifle"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "382", "457", Path.Combine(PathToSHPs, "rifledeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "458", "633", Path.Combine(PathToSHPs, "bazooka"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "634", "693", Path.Combine(PathToSHPs, "bazookadeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "694", "869", Path.Combine(PathToSHPs, "fremen"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "870", "929", Path.Combine(PathToSHPs, "fremendeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "930", "1105", Path.Combine(PathToSHPs, "sardaukar"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1106", "1165", Path.Combine(PathToSHPs, "sardaukardeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1166", "1341", Path.Combine(PathToSHPs, "engineer"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1342", "1401", Path.Combine(PathToSHPs, "engineerdeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1402", "1457", Path.Combine(PathToSHPs, "thumper"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1458", "1462", Path.Combine(PathToSHPs, "thumping"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1463", "1542", Path.Combine(PathToSHPs, "thumper2"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1543", "1602", Path.Combine(PathToSHPs, "thumperdeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1603", "1634", Path.Combine(PathToSHPs, "missiletank"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1635", "1666", Path.Combine(PathToSHPs, "trike"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1667", "1698", Path.Combine(PathToSHPs, "quad"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1699", "1730", Path.Combine(PathToSHPs, "harvester"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1731", "1762", Path.Combine(PathToSHPs, "combata"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1763", "1794", Path.Combine(PathToSHPs, "siegetank"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1795", "1826", Path.Combine(PathToSHPs, "dmcv"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1827", "1858", Path.Combine(PathToSHPs, "sonictank"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1859", "1890", Path.Combine(PathToSHPs, "combataturret"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1891", "1922", Path.Combine(PathToSHPs, "siegeturret"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1923", "1954", Path.Combine(PathToSHPs, "carryall"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "1955", "2050", Path.Combine(PathToSHPs, "orni"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2051", "2082", Path.Combine(PathToSHPs, "combath"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2083", "2114", Path.Combine(PathToSHPs, "devast"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2115", "2146", Path.Combine(PathToSHPs, "combathturret"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2147", "2148", Path.Combine(PathToSHPs, "deathhandmissile")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2149", "2324", Path.Combine(PathToSHPs, "saboteur"), "--infantry"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2325", "2388", Path.Combine(PathToSHPs, "saboteurdeath"), "--infantrydeath"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2389", "2420", Path.Combine(PathToSHPs, "deviatortank"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2421", "2452", Path.Combine(PathToSHPs, "raider"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2453", "2484", Path.Combine(PathToSHPs, "combato"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2485", "2516", Path.Combine(PathToSHPs, "combatoturret"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2517", "2517", Path.Combine(PathToSHPs, "frigate"), "--vehicle"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2518", "2520", Path.Combine(PathToSHPs, "heavya"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2521", "2522", Path.Combine(PathToSHPs, "radara"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2523", "2524", Path.Combine(PathToSHPs, "pwra"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2525", "2526", Path.Combine(PathToSHPs, "barra"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2527", "2558", Path.Combine(PathToSHPs, "walla"), "--wall"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2559", "2560", Path.Combine(PathToSHPs, "conyarda"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2561", "2563", Path.Combine(PathToSHPs, "refa"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2564", "2565", Path.Combine(PathToSHPs, "hightecha"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2566", "2570", Path.Combine(PathToSHPs, "siloa"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2571", "2572", Path.Combine(PathToSHPs, "repaira"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2573", "2588", Path.Combine(PathToSHPs, "guntowera"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2589", "2620", Path.Combine(PathToSHPs, "gunturreta"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2621", "2636", Path.Combine(PathToSHPs, "rockettowera"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2637", "2668", Path.Combine(PathToSHPs, "rocketturreta"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2669", "2670", Path.Combine(PathToSHPs, "researcha"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2671", "2672", Path.Combine(PathToSHPs, "starporta"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2673", "2675", Path.Combine(PathToSHPs, "lighta"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2676", "2677", Path.Combine(PathToSHPs, "palacea"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2678", "2680", Path.Combine(PathToSHPs, "heavyh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2681", "2682", Path.Combine(PathToSHPs, "radarh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2683", "2684", Path.Combine(PathToSHPs, "pwrh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2685", "2686", Path.Combine(PathToSHPs, "barrh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2687", "2718", Path.Combine(PathToSHPs, "wallh"), "--wall"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2719", "2720", Path.Combine(PathToSHPs, "conyardh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2721", "2723", Path.Combine(PathToSHPs, "refh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2724", "2725", Path.Combine(PathToSHPs, "hightechh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2726", "2730", Path.Combine(PathToSHPs, "siloh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2731", "2732", Path.Combine(PathToSHPs, "repairh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2733", "2748", Path.Combine(PathToSHPs, "guntowerh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2749", "2780", Path.Combine(PathToSHPs, "gunturreth"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2781", "2796", Path.Combine(PathToSHPs, "rockettowerh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2797", "2828", Path.Combine(PathToSHPs, "rocketturreth"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2829", "2830", Path.Combine(PathToSHPs, "researchh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2831", "2832", Path.Combine(PathToSHPs, "starporth"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2833", "2835", Path.Combine(PathToSHPs, "lighth"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2836", "2837", Path.Combine(PathToSHPs, "palaceh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2838", "2840", Path.Combine(PathToSHPs, "heavyo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2841", "2842", Path.Combine(PathToSHPs, "radaro"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2843", "2844", Path.Combine(PathToSHPs, "pwro"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2845", "2846", Path.Combine(PathToSHPs, "barro"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2847", "2878", Path.Combine(PathToSHPs, "wallo"), "--wall"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2879", "2880", Path.Combine(PathToSHPs, "conyardo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2881", "2883", Path.Combine(PathToSHPs, "refo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2884", "2885", Path.Combine(PathToSHPs, "hightecho"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2886", "2890", Path.Combine(PathToSHPs, "siloo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2891", "2892", Path.Combine(PathToSHPs, "repairo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2893", "2908", Path.Combine(PathToSHPs, "guntowero"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2909", "2940", Path.Combine(PathToSHPs, "gunturreto"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2941", "2956", Path.Combine(PathToSHPs, "rockettowero"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2957", "2988", Path.Combine(PathToSHPs, "rocketturreto"), "--turret"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2989", "2990", Path.Combine(PathToSHPs, "researcho"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2991", "2992", Path.Combine(PathToSHPs, "starporto"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2993", "2995", Path.Combine(PathToSHPs, "lighto"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2996", "2997", Path.Combine(PathToSHPs, "palaceo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2998", "2998", Path.Combine(PathToSHPs, "sietch"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "2999", "3000", Path.Combine(PathToSHPs, "starportc"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3001", "3003", Path.Combine(PathToSHPs, "heavyc"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3004", "3005", Path.Combine(PathToSHPs, "palacec"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3006", "3007", Path.Combine(PathToSHPs, "conyardh2"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3008", "3013", Path.Combine(PathToSHPs, "plates")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3014", "3014", Path.Combine(PathToSHPs, "unknown3"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3015", "3078", Path.Combine(PathToSHPs, "rpg"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3079", "3087", Path.Combine(PathToSHPs, "unknown4"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3088", "3247", Path.Combine(PathToSHPs, "missile"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3248", "3279", Path.Combine(PathToSHPs, "doubleblast"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3280", "3283", Path.Combine(PathToSHPs, "bombs"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3284", "3287", Path.Combine(PathToSHPs, "unknown6"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3288", "3289", Path.Combine(PathToSHPs, "unknown7"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3290", "3303", Path.Combine(PathToSHPs, "unknown8"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3304", "3305", Path.Combine(PathToSHPs, "unknown9"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3306", "3369", Path.Combine(PathToSHPs, "missile2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3370", "3380", Path.Combine(PathToSHPs, "unload"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3381", "3385", Path.Combine(PathToSHPs, "harvest"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3386", "3389", Path.Combine(PathToSHPs, "miniboom"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3390", "3402", Path.Combine(PathToSHPs, "mediboom"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3403", "3417", Path.Combine(PathToSHPs, "mediboom2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3418", "3420", Path.Combine(PathToSHPs, "minifire"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3421", "3428", Path.Combine(PathToSHPs, "miniboom2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3429", "3432", Path.Combine(PathToSHPs, "minibooms"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3433", "3447", Path.Combine(PathToSHPs, "bigboom"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3448", "3470", Path.Combine(PathToSHPs, "bigboom2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3471", "3493", Path.Combine(PathToSHPs, "bigboom3"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3494", "3501", Path.Combine(PathToSHPs, "unknown10"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3502", "3509", Path.Combine(PathToSHPs, "unknown11"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3510", "3511", Path.Combine(PathToSHPs, "unknown12"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3512", "3530", Path.Combine(PathToSHPs, "movingsand"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3531", "3534", Path.Combine(PathToSHPs, "unknown13"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3535", "3539", Path.Combine(PathToSHPs, "unknown14"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3540", "3543", Path.Combine(PathToSHPs, "unknown15"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3544", "3548", Path.Combine(PathToSHPs, "unknown16"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3549", "3564", Path.Combine(PathToSHPs, "wormjaw"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3565", "3585", Path.Combine(PathToSHPs, "wormdust"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3586", "3600", Path.Combine(PathToSHPs, "wormsigns1")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3601", "3610", Path.Combine(PathToSHPs, "wormsigns2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3611", "3615", Path.Combine(PathToSHPs, "wormsigns3")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3616", "3620", Path.Combine(PathToSHPs, "wormsigns4")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3621", "3625", Path.Combine(PathToSHPs, "rings"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3626", "3630", Path.Combine(PathToSHPs, "minipiff"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3631", "3678", Path.Combine(PathToSHPs, "movingsand2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3679", "3686", Path.Combine(PathToSHPs, "selling"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3687", "3693", Path.Combine(PathToSHPs, "shockwave"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3694", "3711", Path.Combine(PathToSHPs, "electroplosion"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3712", "3722", Path.Combine(PathToSHPs, "fire"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3723", "3734", Path.Combine(PathToSHPs, "fire2"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3735", "3738", Path.Combine(PathToSHPs, "unknown21"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3739", "3742", Path.Combine(PathToSHPs, "unknown22"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3743", "3774", Path.Combine(PathToSHPs, "doublemuzzle"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3775", "3806", Path.Combine(PathToSHPs, "muzzle"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3807", "3838", Path.Combine(PathToSHPs, "doubleblastmuzzle"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3839", "3870", Path.Combine(PathToSHPs, "minimuzzle"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3871", "3872", Path.Combine(PathToSHPs, "unknown17"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3873", "3875", Path.Combine(PathToSHPs, "unknown18"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3876", "3876", Path.Combine(PathToSHPs, "unknown19"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3877", "3884", Path.Combine(PathToSHPs, "burst"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3885", "3898", Path.Combine(PathToSHPs, "fire3"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3899", "3910", Path.Combine(PathToSHPs, "energy"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3911", "3946", Path.Combine(PathToSHPs, "reveal"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3947", "3964", Path.Combine(PathToSHPs, "orbit"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3965", "3979", Path.Combine(PathToSHPs, "mushroomcloud"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3980", "3987", Path.Combine(PathToSHPs, "mediboom3"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "3988", "4010", Path.Combine(PathToSHPs, "largeboom"), "--projectile"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4011", "4011", Path.Combine(PathToSHPs, "rifleicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4012", "4012", Path.Combine(PathToSHPs, "bazookaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4013", "4013", Path.Combine(PathToSHPs, "engineericon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4014", "4014", Path.Combine(PathToSHPs, "thumpericon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4015", "4015", Path.Combine(PathToSHPs, "sardaukaricon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4016", "4016", Path.Combine(PathToSHPs, "trikeicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4017", "4017", Path.Combine(PathToSHPs, "raidericon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4018", "4018", Path.Combine(PathToSHPs, "quadicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4019", "4019", Path.Combine(PathToSHPs, "harvestericon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4020", "4020", Path.Combine(PathToSHPs, "combataicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4021", "4021", Path.Combine(PathToSHPs, "combathicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4022", "4022", Path.Combine(PathToSHPs, "combatoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4023", "4023", Path.Combine(PathToSHPs, "mcvicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4024", "4024", Path.Combine(PathToSHPs, "missiletankicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4025", "4025", Path.Combine(PathToSHPs, "deviatortankicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4026", "4026", Path.Combine(PathToSHPs, "siegetankicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4027", "4027", Path.Combine(PathToSHPs, "sonictankicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4028", "4028", Path.Combine(PathToSHPs, "devasticon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4029", "4029", Path.Combine(PathToSHPs, "carryallicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4030", "4030", Path.Combine(PathToSHPs, "carryallicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4031", "4031", Path.Combine(PathToSHPs, "orniicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4032", "4032", Path.Combine(PathToSHPs, "fremenicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4033", "4033", Path.Combine(PathToSHPs, "fremenicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4034", "4034", Path.Combine(PathToSHPs, "saboteuricon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4035", "4035", Path.Combine(PathToSHPs, "deathhandicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4036", "4036", Path.Combine(PathToSHPs, "rifleicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4037", "4037", Path.Combine(PathToSHPs, "bazookaicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4038", "4038", Path.Combine(PathToSHPs, "engineericon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4039", "4039", Path.Combine(PathToSHPs, "thumpericon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4040", "4040", Path.Combine(PathToSHPs, "sardaukaricon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4041", "4041", Path.Combine(PathToSHPs, "trikeicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4042", "4042", Path.Combine(PathToSHPs, "raidericon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4043", "4043", Path.Combine(PathToSHPs, "quadicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4044", "4044", Path.Combine(PathToSHPs, "harvestericon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4045", "4045", Path.Combine(PathToSHPs, "combataicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4046", "4046", Path.Combine(PathToSHPs, "conyardaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4047", "4047", Path.Combine(PathToSHPs, "conyardhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4048", "4048", Path.Combine(PathToSHPs, "conyardoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4049", "4049", Path.Combine(PathToSHPs, "conyardaicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4050", "4050", Path.Combine(PathToSHPs, "4plateaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4051", "4051", Path.Combine(PathToSHPs, "4platehicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4052", "4052", Path.Combine(PathToSHPs, "4plateoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4053", "4053", Path.Combine(PathToSHPs, "6plateaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4054", "4054", Path.Combine(PathToSHPs, "6platehicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4055", "4055", Path.Combine(PathToSHPs, "6plateoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4056", "4056", Path.Combine(PathToSHPs, "pwraicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4057", "4057", Path.Combine(PathToSHPs, "pwrhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4058", "4058", Path.Combine(PathToSHPs, "pwroicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4059", "4059", Path.Combine(PathToSHPs, "barraicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4060", "4060", Path.Combine(PathToSHPs, "barrhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4061", "4061", Path.Combine(PathToSHPs, "barroicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4062", "4062", Path.Combine(PathToSHPs, "orniicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4063", "4063", Path.Combine(PathToSHPs, "wallaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4064", "4064", Path.Combine(PathToSHPs, "wallhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4065", "4065", Path.Combine(PathToSHPs, "walloicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4066", "4066", Path.Combine(PathToSHPs, "refaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4067", "4067", Path.Combine(PathToSHPs, "refhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4068", "4068", Path.Combine(PathToSHPs, "refoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4069", "4069", Path.Combine(PathToSHPs, "guntoweraicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4070", "4070", Path.Combine(PathToSHPs, "guntowerhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4071", "4071", Path.Combine(PathToSHPs, "guntoweroicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4072", "4072", Path.Combine(PathToSHPs, "radaraicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4073", "4073", Path.Combine(PathToSHPs, "radarhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4074", "4074", Path.Combine(PathToSHPs, "radaroicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4075", "4075", Path.Combine(PathToSHPs, "rockettoweraicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4076", "4076", Path.Combine(PathToSHPs, "rockettowerhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4077", "4077", Path.Combine(PathToSHPs, "rockettoweroicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4078", "4078", Path.Combine(PathToSHPs, "hightechaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4079", "4079", Path.Combine(PathToSHPs, "hightechhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4080", "4080", Path.Combine(PathToSHPs, "hightechoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4081", "4081", Path.Combine(PathToSHPs, "lightaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4082", "4082", Path.Combine(PathToSHPs, "lighthicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4083", "4083", Path.Combine(PathToSHPs, "lightoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4084", "4084", Path.Combine(PathToSHPs, "siloaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4085", "4085", Path.Combine(PathToSHPs, "silohicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4086", "4086", Path.Combine(PathToSHPs, "silooicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4087", "4087", Path.Combine(PathToSHPs, "heavyaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4088", "4088", Path.Combine(PathToSHPs, "heavyhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4089", "4089", Path.Combine(PathToSHPs, "heavyoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4090", "4090", Path.Combine(PathToSHPs, "orniicon3")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4091", "4091", Path.Combine(PathToSHPs, "heavyhicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4092", "4092", Path.Combine(PathToSHPs, "starportaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4093", "4093", Path.Combine(PathToSHPs, "starporthicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4094", "4094", Path.Combine(PathToSHPs, "starportoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4095", "4095", Path.Combine(PathToSHPs, "orniicon4")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4096", "4096", Path.Combine(PathToSHPs, "repairaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4097", "4097", Path.Combine(PathToSHPs, "repairhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4098", "4098", Path.Combine(PathToSHPs, "repairoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4099", "4099", Path.Combine(PathToSHPs, "researchaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4100", "4100", Path.Combine(PathToSHPs, "researchhicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4101", "4101", Path.Combine(PathToSHPs, "researchoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4102", "4102", Path.Combine(PathToSHPs, "palaceaicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4103", "4103", Path.Combine(PathToSHPs, "palacehicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4104", "4104", Path.Combine(PathToSHPs, "palaceoicon")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4105", "4105", Path.Combine(PathToSHPs, "orniicon5")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4106", "4106", Path.Combine(PathToSHPs, "radaraicon2")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4107", "4107", Path.Combine(PathToSHPs, "radaraicon3")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4108", "4108", Path.Combine(PathToSHPs, "conyardaicon3")}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4109", "4150", Path.Combine(PathToSHPs, "conmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4151", "4174", Path.Combine(PathToSHPs, "wtrpmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4175", "4194", Path.Combine(PathToSHPs, "barramake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4195", "4212", Path.Combine(PathToSHPs, "barrhmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4213", "4230", Path.Combine(PathToSHPs, "barromake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4231", "4253", Path.Combine(PathToSHPs, "refmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4254", "4273", Path.Combine(PathToSHPs, "radarmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4274", "4294", Path.Combine(PathToSHPs, "highmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4295", "4312", Path.Combine(PathToSHPs, "lightmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4313", "4327", Path.Combine(PathToSHPs, "silomake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4328", "4346", Path.Combine(PathToSHPs, "heavymake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4347", "4369", Path.Combine(PathToSHPs, "starportmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4370", "4390", Path.Combine(PathToSHPs, "repairmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4391", "4412", Path.Combine(PathToSHPs, "researchmake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4413", "4435", Path.Combine(PathToSHPs, "palacemake"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4436", "4449", Path.Combine(PathToSHPs, "cranea"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4450", "4463", Path.Combine(PathToSHPs, "craneh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4464", "4477", Path.Combine(PathToSHPs, "craneo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4478", "4491", Path.Combine(PathToSHPs, "cranea2"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4492", "4501", Path.Combine(PathToSHPs, "windtrapa"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4502", "4511", Path.Combine(PathToSHPs, "windtraph"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4512", "4521", Path.Combine(PathToSHPs, "windtrapo"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4522", "4552", Path.Combine(PathToSHPs, "disha"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4553", "4582", Path.Combine(PathToSHPs, "dishh"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4583", "4613", Path.Combine(PathToSHPs, "disho"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4614", "4643", Path.Combine(PathToSHPs, "highweld"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4644", "4673", Path.Combine(PathToSHPs, "lightweld"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4674", "4721", Path.Combine(PathToSHPs, "heavyweld"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4722", "4744", Path.Combine(PathToSHPs, "unknown20"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4745", "4759", Path.Combine(PathToSHPs, "marker"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4760", "4819", Path.Combine(PathToSHPs, "researchzaps"), "--building"}, - new string[] {"--r8", PathToDataR8, PathToPalette, "4820", "4840", Path.Combine(PathToSHPs, "deathhandlaunch"), "--building"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/MOUSE.R8"), PathToPalette, "0", "264", Path.Combine(PathToSHPs, "mouse")}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "BASE"), "--tileset"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "748", "749", Path.Combine(PathToSHPs, "spice0")}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBAT.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "BAT"), "--tileset"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBGBS.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "BGBS"), "--tileset"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXICE.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "ICE"), "--tileset"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXTREE.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "TREE"), "--tileset"}, - new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXWAST.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "WAST"), "--tileset"}, - //new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXXMAS.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "XMAS"), "--tileset"}, + new string[] { "--r8", pathToDataR8, pathToPalette, "0", "2", Path.Combine(pathToSHPs, "overlay") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3", "3", Path.Combine(pathToSHPs, "repairing") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4", "4", Path.Combine(pathToSHPs, "black") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "5", "8", Path.Combine(pathToSHPs, "selectionedges") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "9", "9", Path.Combine(pathToSHPs, "bar1") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "10", "10", Path.Combine(pathToSHPs, "bar2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "11", "11", Path.Combine(pathToSHPs, "bar3") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "12", "12", Path.Combine(pathToSHPs, "bar4") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "13", "13", Path.Combine(pathToSHPs, "bar5") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "14", "14", Path.Combine(pathToSHPs, "bar6") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "15", "16", Path.Combine(pathToSHPs, "dots") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "17", "26", Path.Combine(pathToSHPs, "numbers") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "27", "37", Path.Combine(pathToSHPs, "credits") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "40", "101", Path.Combine(pathToSHPs, "d2kshadow") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "102", "105", Path.Combine(pathToSHPs, "crates") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "107", "109", Path.Combine(pathToSHPs, "spicebloom") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "110", "111", Path.Combine(pathToSHPs, "stars") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "112", "113", Path.Combine(pathToSHPs, "greenuparrow") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "114", "129", Path.Combine(pathToSHPs, "rockcrater1") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "130", "145", Path.Combine(pathToSHPs, "rockcrater2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "146", "161", Path.Combine(pathToSHPs, "sandcrater1") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "162", "177", Path.Combine(pathToSHPs, "sandcrater2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "178", "193", Path.Combine(pathToSHPs, "unknown") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "194", "205", Path.Combine(pathToSHPs, "unknown2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "206", "381", Path.Combine(pathToSHPs, "rifle"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "382", "457", Path.Combine(pathToSHPs, "rifledeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "458", "633", Path.Combine(pathToSHPs, "bazooka"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "634", "693", Path.Combine(pathToSHPs, "bazookadeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "694", "869", Path.Combine(pathToSHPs, "fremen"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "870", "929", Path.Combine(pathToSHPs, "fremendeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "930", "1105", Path.Combine(pathToSHPs, "sardaukar"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1106", "1165", Path.Combine(pathToSHPs, "sardaukardeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1166", "1341", Path.Combine(pathToSHPs, "engineer"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1342", "1401", Path.Combine(pathToSHPs, "engineerdeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1402", "1457", Path.Combine(pathToSHPs, "thumper"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1458", "1462", Path.Combine(pathToSHPs, "thumping"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1463", "1542", Path.Combine(pathToSHPs, "thumper2"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1543", "1602", Path.Combine(pathToSHPs, "thumperdeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1603", "1634", Path.Combine(pathToSHPs, "missiletank"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1635", "1666", Path.Combine(pathToSHPs, "trike"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1667", "1698", Path.Combine(pathToSHPs, "quad"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1699", "1730", Path.Combine(pathToSHPs, "harvester"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1731", "1762", Path.Combine(pathToSHPs, "combata"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1763", "1794", Path.Combine(pathToSHPs, "siegetank"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1795", "1826", Path.Combine(pathToSHPs, "dmcv"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1827", "1858", Path.Combine(pathToSHPs, "sonictank"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1859", "1890", Path.Combine(pathToSHPs, "combataturret"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1891", "1922", Path.Combine(pathToSHPs, "siegeturret"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1923", "1954", Path.Combine(pathToSHPs, "carryall"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "1955", "2050", Path.Combine(pathToSHPs, "orni"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2051", "2082", Path.Combine(pathToSHPs, "combath"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2083", "2114", Path.Combine(pathToSHPs, "devast"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2115", "2146", Path.Combine(pathToSHPs, "combathturret"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2147", "2148", Path.Combine(pathToSHPs, "deathhandmissile") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2149", "2324", Path.Combine(pathToSHPs, "saboteur"), "--infantry" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2325", "2388", Path.Combine(pathToSHPs, "saboteurdeath"), "--infantrydeath" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2389", "2420", Path.Combine(pathToSHPs, "deviatortank"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2421", "2452", Path.Combine(pathToSHPs, "raider"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2453", "2484", Path.Combine(pathToSHPs, "combato"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2485", "2516", Path.Combine(pathToSHPs, "combatoturret"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2517", "2517", Path.Combine(pathToSHPs, "frigate"), "--vehicle" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2518", "2520", Path.Combine(pathToSHPs, "heavya"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2521", "2522", Path.Combine(pathToSHPs, "radara"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2523", "2524", Path.Combine(pathToSHPs, "pwra"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2525", "2526", Path.Combine(pathToSHPs, "barra"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2527", "2558", Path.Combine(pathToSHPs, "walla"), "--wall" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2559", "2560", Path.Combine(pathToSHPs, "conyarda"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2561", "2563", Path.Combine(pathToSHPs, "refa"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2564", "2565", Path.Combine(pathToSHPs, "hightecha"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2566", "2570", Path.Combine(pathToSHPs, "siloa"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2571", "2572", Path.Combine(pathToSHPs, "repaira"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2573", "2588", Path.Combine(pathToSHPs, "guntowera"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2589", "2620", Path.Combine(pathToSHPs, "gunturreta"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2621", "2636", Path.Combine(pathToSHPs, "rockettowera"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2637", "2668", Path.Combine(pathToSHPs, "rocketturreta"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2669", "2670", Path.Combine(pathToSHPs, "researcha"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2671", "2672", Path.Combine(pathToSHPs, "starporta"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2673", "2675", Path.Combine(pathToSHPs, "lighta"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2676", "2677", Path.Combine(pathToSHPs, "palacea"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2678", "2680", Path.Combine(pathToSHPs, "heavyh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2681", "2682", Path.Combine(pathToSHPs, "radarh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2683", "2684", Path.Combine(pathToSHPs, "pwrh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2685", "2686", Path.Combine(pathToSHPs, "barrh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2687", "2718", Path.Combine(pathToSHPs, "wallh"), "--wall" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2719", "2720", Path.Combine(pathToSHPs, "conyardh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2721", "2723", Path.Combine(pathToSHPs, "refh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2724", "2725", Path.Combine(pathToSHPs, "hightechh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2726", "2730", Path.Combine(pathToSHPs, "siloh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2731", "2732", Path.Combine(pathToSHPs, "repairh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2733", "2748", Path.Combine(pathToSHPs, "guntowerh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2749", "2780", Path.Combine(pathToSHPs, "gunturreth"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2781", "2796", Path.Combine(pathToSHPs, "rockettowerh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2797", "2828", Path.Combine(pathToSHPs, "rocketturreth"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2829", "2830", Path.Combine(pathToSHPs, "researchh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2831", "2832", Path.Combine(pathToSHPs, "starporth"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2833", "2835", Path.Combine(pathToSHPs, "lighth"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2836", "2837", Path.Combine(pathToSHPs, "palaceh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2838", "2840", Path.Combine(pathToSHPs, "heavyo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2841", "2842", Path.Combine(pathToSHPs, "radaro"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2843", "2844", Path.Combine(pathToSHPs, "pwro"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2845", "2846", Path.Combine(pathToSHPs, "barro"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2847", "2878", Path.Combine(pathToSHPs, "wallo"), "--wall" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2879", "2880", Path.Combine(pathToSHPs, "conyardo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2881", "2883", Path.Combine(pathToSHPs, "refo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2884", "2885", Path.Combine(pathToSHPs, "hightecho"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2886", "2890", Path.Combine(pathToSHPs, "siloo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2891", "2892", Path.Combine(pathToSHPs, "repairo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2893", "2908", Path.Combine(pathToSHPs, "guntowero"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2909", "2940", Path.Combine(pathToSHPs, "gunturreto"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2941", "2956", Path.Combine(pathToSHPs, "rockettowero"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2957", "2988", Path.Combine(pathToSHPs, "rocketturreto"), "--turret" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2989", "2990", Path.Combine(pathToSHPs, "researcho"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2991", "2992", Path.Combine(pathToSHPs, "starporto"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2993", "2995", Path.Combine(pathToSHPs, "lighto"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2996", "2997", Path.Combine(pathToSHPs, "palaceo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2998", "2998", Path.Combine(pathToSHPs, "sietch"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "2999", "3000", Path.Combine(pathToSHPs, "starportc"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3001", "3003", Path.Combine(pathToSHPs, "heavyc"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3004", "3005", Path.Combine(pathToSHPs, "palacec"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3006", "3007", Path.Combine(pathToSHPs, "conyardh2"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3008", "3013", Path.Combine(pathToSHPs, "plates") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3014", "3014", Path.Combine(pathToSHPs, "unknown3"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3015", "3078", Path.Combine(pathToSHPs, "rpg"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3079", "3087", Path.Combine(pathToSHPs, "unknown4"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3088", "3247", Path.Combine(pathToSHPs, "missile"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3248", "3279", Path.Combine(pathToSHPs, "doubleblast"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3280", "3283", Path.Combine(pathToSHPs, "bombs"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3284", "3287", Path.Combine(pathToSHPs, "unknown6"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3288", "3289", Path.Combine(pathToSHPs, "unknown7"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3290", "3303", Path.Combine(pathToSHPs, "unknown8"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3304", "3305", Path.Combine(pathToSHPs, "unknown9"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3306", "3369", Path.Combine(pathToSHPs, "missile2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3370", "3380", Path.Combine(pathToSHPs, "unload"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3381", "3385", Path.Combine(pathToSHPs, "harvest"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3386", "3389", Path.Combine(pathToSHPs, "miniboom"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3390", "3402", Path.Combine(pathToSHPs, "mediboom"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3403", "3417", Path.Combine(pathToSHPs, "mediboom2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3418", "3420", Path.Combine(pathToSHPs, "minifire"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3421", "3428", Path.Combine(pathToSHPs, "miniboom2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3429", "3432", Path.Combine(pathToSHPs, "minibooms"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3433", "3447", Path.Combine(pathToSHPs, "bigboom"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3448", "3470", Path.Combine(pathToSHPs, "bigboom2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3471", "3493", Path.Combine(pathToSHPs, "bigboom3"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3494", "3501", Path.Combine(pathToSHPs, "unknown10"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3502", "3509", Path.Combine(pathToSHPs, "unknown11"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3510", "3511", Path.Combine(pathToSHPs, "unknown12"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3512", "3530", Path.Combine(pathToSHPs, "movingsand"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3531", "3534", Path.Combine(pathToSHPs, "unknown13"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3535", "3539", Path.Combine(pathToSHPs, "unknown14"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3540", "3543", Path.Combine(pathToSHPs, "unknown15"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3544", "3548", Path.Combine(pathToSHPs, "unknown16"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3549", "3564", Path.Combine(pathToSHPs, "wormjaw"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3565", "3585", Path.Combine(pathToSHPs, "wormdust"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3586", "3600", Path.Combine(pathToSHPs, "wormsigns1") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3601", "3610", Path.Combine(pathToSHPs, "wormsigns2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3611", "3615", Path.Combine(pathToSHPs, "wormsigns3") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3616", "3620", Path.Combine(pathToSHPs, "wormsigns4") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3621", "3625", Path.Combine(pathToSHPs, "rings"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3626", "3630", Path.Combine(pathToSHPs, "minipiff"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3631", "3678", Path.Combine(pathToSHPs, "movingsand2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3679", "3686", Path.Combine(pathToSHPs, "selling"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3687", "3693", Path.Combine(pathToSHPs, "shockwave"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3694", "3711", Path.Combine(pathToSHPs, "electroplosion"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3712", "3722", Path.Combine(pathToSHPs, "fire"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3723", "3734", Path.Combine(pathToSHPs, "fire2"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3735", "3738", Path.Combine(pathToSHPs, "unknown21"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3739", "3742", Path.Combine(pathToSHPs, "unknown22"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3743", "3774", Path.Combine(pathToSHPs, "doublemuzzle"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3775", "3806", Path.Combine(pathToSHPs, "muzzle"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3807", "3838", Path.Combine(pathToSHPs, "doubleblastmuzzle"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3839", "3870", Path.Combine(pathToSHPs, "minimuzzle"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3871", "3872", Path.Combine(pathToSHPs, "unknown17"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3873", "3875", Path.Combine(pathToSHPs, "unknown18"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3876", "3876", Path.Combine(pathToSHPs, "unknown19"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3877", "3884", Path.Combine(pathToSHPs, "burst"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3885", "3898", Path.Combine(pathToSHPs, "fire3"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3899", "3910", Path.Combine(pathToSHPs, "energy"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3911", "3946", Path.Combine(pathToSHPs, "reveal"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3947", "3964", Path.Combine(pathToSHPs, "orbit"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3965", "3979", Path.Combine(pathToSHPs, "mushroomcloud"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3980", "3987", Path.Combine(pathToSHPs, "mediboom3"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "3988", "4010", Path.Combine(pathToSHPs, "largeboom"), "--projectile" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4011", "4011", Path.Combine(pathToSHPs, "rifleicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4012", "4012", Path.Combine(pathToSHPs, "bazookaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4013", "4013", Path.Combine(pathToSHPs, "engineericon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4014", "4014", Path.Combine(pathToSHPs, "thumpericon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4015", "4015", Path.Combine(pathToSHPs, "sardaukaricon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4016", "4016", Path.Combine(pathToSHPs, "trikeicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4017", "4017", Path.Combine(pathToSHPs, "raidericon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4018", "4018", Path.Combine(pathToSHPs, "quadicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4019", "4019", Path.Combine(pathToSHPs, "harvestericon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4020", "4020", Path.Combine(pathToSHPs, "combataicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4021", "4021", Path.Combine(pathToSHPs, "combathicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4022", "4022", Path.Combine(pathToSHPs, "combatoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4023", "4023", Path.Combine(pathToSHPs, "mcvicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4024", "4024", Path.Combine(pathToSHPs, "missiletankicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4025", "4025", Path.Combine(pathToSHPs, "deviatortankicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4026", "4026", Path.Combine(pathToSHPs, "siegetankicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4027", "4027", Path.Combine(pathToSHPs, "sonictankicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4028", "4028", Path.Combine(pathToSHPs, "devasticon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4029", "4029", Path.Combine(pathToSHPs, "carryallicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4030", "4030", Path.Combine(pathToSHPs, "carryallicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4031", "4031", Path.Combine(pathToSHPs, "orniicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4032", "4032", Path.Combine(pathToSHPs, "fremenicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4033", "4033", Path.Combine(pathToSHPs, "fremenicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4034", "4034", Path.Combine(pathToSHPs, "saboteuricon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4035", "4035", Path.Combine(pathToSHPs, "deathhandicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4036", "4036", Path.Combine(pathToSHPs, "rifleicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4037", "4037", Path.Combine(pathToSHPs, "bazookaicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4038", "4038", Path.Combine(pathToSHPs, "engineericon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4039", "4039", Path.Combine(pathToSHPs, "thumpericon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4040", "4040", Path.Combine(pathToSHPs, "sardaukaricon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4041", "4041", Path.Combine(pathToSHPs, "trikeicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4042", "4042", Path.Combine(pathToSHPs, "raidericon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4043", "4043", Path.Combine(pathToSHPs, "quadicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4044", "4044", Path.Combine(pathToSHPs, "harvestericon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4045", "4045", Path.Combine(pathToSHPs, "combataicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4046", "4046", Path.Combine(pathToSHPs, "conyardaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4047", "4047", Path.Combine(pathToSHPs, "conyardhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4048", "4048", Path.Combine(pathToSHPs, "conyardoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4049", "4049", Path.Combine(pathToSHPs, "conyardaicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4050", "4050", Path.Combine(pathToSHPs, "4plateaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4051", "4051", Path.Combine(pathToSHPs, "4platehicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4052", "4052", Path.Combine(pathToSHPs, "4plateoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4053", "4053", Path.Combine(pathToSHPs, "6plateaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4054", "4054", Path.Combine(pathToSHPs, "6platehicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4055", "4055", Path.Combine(pathToSHPs, "6plateoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4056", "4056", Path.Combine(pathToSHPs, "pwraicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4057", "4057", Path.Combine(pathToSHPs, "pwrhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4058", "4058", Path.Combine(pathToSHPs, "pwroicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4059", "4059", Path.Combine(pathToSHPs, "barraicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4060", "4060", Path.Combine(pathToSHPs, "barrhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4061", "4061", Path.Combine(pathToSHPs, "barroicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4062", "4062", Path.Combine(pathToSHPs, "orniicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4063", "4063", Path.Combine(pathToSHPs, "wallaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4064", "4064", Path.Combine(pathToSHPs, "wallhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4065", "4065", Path.Combine(pathToSHPs, "walloicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4066", "4066", Path.Combine(pathToSHPs, "refaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4067", "4067", Path.Combine(pathToSHPs, "refhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4068", "4068", Path.Combine(pathToSHPs, "refoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4069", "4069", Path.Combine(pathToSHPs, "guntoweraicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4070", "4070", Path.Combine(pathToSHPs, "guntowerhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4071", "4071", Path.Combine(pathToSHPs, "guntoweroicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4072", "4072", Path.Combine(pathToSHPs, "radaraicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4073", "4073", Path.Combine(pathToSHPs, "radarhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4074", "4074", Path.Combine(pathToSHPs, "radaroicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4075", "4075", Path.Combine(pathToSHPs, "rockettoweraicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4076", "4076", Path.Combine(pathToSHPs, "rockettowerhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4077", "4077", Path.Combine(pathToSHPs, "rockettoweroicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4078", "4078", Path.Combine(pathToSHPs, "hightechaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4079", "4079", Path.Combine(pathToSHPs, "hightechhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4080", "4080", Path.Combine(pathToSHPs, "hightechoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4081", "4081", Path.Combine(pathToSHPs, "lightaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4082", "4082", Path.Combine(pathToSHPs, "lighthicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4083", "4083", Path.Combine(pathToSHPs, "lightoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4084", "4084", Path.Combine(pathToSHPs, "siloaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4085", "4085", Path.Combine(pathToSHPs, "silohicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4086", "4086", Path.Combine(pathToSHPs, "silooicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4087", "4087", Path.Combine(pathToSHPs, "heavyaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4088", "4088", Path.Combine(pathToSHPs, "heavyhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4089", "4089", Path.Combine(pathToSHPs, "heavyoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4090", "4090", Path.Combine(pathToSHPs, "orniicon3") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4091", "4091", Path.Combine(pathToSHPs, "heavyhicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4092", "4092", Path.Combine(pathToSHPs, "starportaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4093", "4093", Path.Combine(pathToSHPs, "starporthicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4094", "4094", Path.Combine(pathToSHPs, "starportoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4095", "4095", Path.Combine(pathToSHPs, "orniicon4") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4096", "4096", Path.Combine(pathToSHPs, "repairaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4097", "4097", Path.Combine(pathToSHPs, "repairhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4098", "4098", Path.Combine(pathToSHPs, "repairoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4099", "4099", Path.Combine(pathToSHPs, "researchaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4100", "4100", Path.Combine(pathToSHPs, "researchhicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4101", "4101", Path.Combine(pathToSHPs, "researchoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4102", "4102", Path.Combine(pathToSHPs, "palaceaicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4103", "4103", Path.Combine(pathToSHPs, "palacehicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4104", "4104", Path.Combine(pathToSHPs, "palaceoicon") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4105", "4105", Path.Combine(pathToSHPs, "orniicon5") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4106", "4106", Path.Combine(pathToSHPs, "radaraicon2") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4107", "4107", Path.Combine(pathToSHPs, "radaraicon3") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4108", "4108", Path.Combine(pathToSHPs, "conyardaicon3") }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4109", "4150", Path.Combine(pathToSHPs, "conmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4151", "4174", Path.Combine(pathToSHPs, "wtrpmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4175", "4194", Path.Combine(pathToSHPs, "barramake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4195", "4212", Path.Combine(pathToSHPs, "barrhmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4213", "4230", Path.Combine(pathToSHPs, "barromake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4231", "4253", Path.Combine(pathToSHPs, "refmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4254", "4273", Path.Combine(pathToSHPs, "radarmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4274", "4294", Path.Combine(pathToSHPs, "highmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4295", "4312", Path.Combine(pathToSHPs, "lightmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4313", "4327", Path.Combine(pathToSHPs, "silomake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4328", "4346", Path.Combine(pathToSHPs, "heavymake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4347", "4369", Path.Combine(pathToSHPs, "starportmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4370", "4390", Path.Combine(pathToSHPs, "repairmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4391", "4412", Path.Combine(pathToSHPs, "researchmake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4413", "4435", Path.Combine(pathToSHPs, "palacemake"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4436", "4449", Path.Combine(pathToSHPs, "cranea"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4450", "4463", Path.Combine(pathToSHPs, "craneh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4464", "4477", Path.Combine(pathToSHPs, "craneo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4478", "4491", Path.Combine(pathToSHPs, "cranea2"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4492", "4501", Path.Combine(pathToSHPs, "windtrapa"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4502", "4511", Path.Combine(pathToSHPs, "windtraph"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4512", "4521", Path.Combine(pathToSHPs, "windtrapo"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4522", "4552", Path.Combine(pathToSHPs, "disha"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4553", "4582", Path.Combine(pathToSHPs, "dishh"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4583", "4613", Path.Combine(pathToSHPs, "disho"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4614", "4643", Path.Combine(pathToSHPs, "highweld"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4644", "4673", Path.Combine(pathToSHPs, "lightweld"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4674", "4721", Path.Combine(pathToSHPs, "heavyweld"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4722", "4744", Path.Combine(pathToSHPs, "unknown20"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4745", "4759", Path.Combine(pathToSHPs, "marker"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4760", "4819", Path.Combine(pathToSHPs, "researchzaps"), "--building" }, + new string[] { "--r8", pathToDataR8, pathToPalette, "4820", "4840", Path.Combine(pathToSHPs, "deathhandlaunch"), "--building" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/MOUSE.R8"), pathToPalette, "0", "264", Path.Combine(pathToSHPs, "mouse") }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "BASE"), "--tileset" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), pathToPalette, "748", "749", Path.Combine(pathToSHPs, "spice0") }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBAT.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "BAT"), "--tileset" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBGBS.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "BGBS"), "--tileset" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXICE.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "ICE"), "--tileset" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXTREE.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "TREE"), "--tileset" }, + new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXWAST.R8"), pathToPalette, "0", "799", Path.Combine(pathToTilesets, "WAST"), "--tileset" }, + ////new string[] { "--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXXMAS.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "XMAS"), "--tileset" }, }; - var SHPsToCreate = new string[][] + var shpToCreate = new string[][] { - new string[] {"--shp", Path.Combine(PathToSHPs, "overlay.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairing.png"), "24"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "black.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "selectionedges.png"), "8"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar1.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar2.png"), "24"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar3.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar4.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar5.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bar6.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "dots.png"), "4"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "numbers.png"), "8"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "credits.png"), "10"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "d2kshadow.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "crates.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "spicebloom.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "stars.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "greenuparrow.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockcrater1.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockcrater2.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sandcrater1.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sandcrater2.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown2.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rifle.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rifledeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bazooka.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bazookadeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fremen.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fremendeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sardaukar.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sardaukardeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "engineer.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "engineerdeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "thumper.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "thumping.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "thumper2.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "thumperdeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "missiletank.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "trike.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "quad.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "harvester.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combata.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siegetank.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "dmcv.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sonictank.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combataturret.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siegeturret.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "carryall.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "orni.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "devast.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combathturret.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "deathhandmissile.png"), "24"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "saboteur.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "saboteurdeath.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "deviatortank.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "raider.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combato.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combatoturret.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "frigate.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavya.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radara.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwra.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barra.png"), "80"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "walla.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyarda.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refa.png"), "120"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightecha.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siloa.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repaira.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntowera.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "gunturreta.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettowera.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rocketturreta.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researcha.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starporta.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lighta.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palacea.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radarh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwrh.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wallh.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barrh.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refh.png"), "120"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightechh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siloh.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntowerh.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "gunturreth.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettowerh.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rocketturreth.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starporth.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lighth.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palaceh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyo.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radaro.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwro.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barro.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wallo.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardo.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refo.png"), "120"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightecho.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siloo.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairo.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntowero.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "gunturreto.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettowero.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rocketturreto.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researcho.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starporto.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lighto.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palaceo.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sietch.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starportc.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyc.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palacec.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardh2.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "plates.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown3.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rpg.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown4.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "missile.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "doubleblast.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bombs.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown6.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown7.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown8.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown9.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "missile2.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unload.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "harvest.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "miniboom.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mediboom.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mediboom2.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "minifire.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "miniboom2.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "minibooms.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bigboom.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bigboom2.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bigboom3.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown10.png"), "24"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown11.png"), "84"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown12.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "movingsand.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown13.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown14.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown15.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown16.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormjaw.png"), "68"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormdust.png"), "68"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormsigns1.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormsigns2.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormsigns3.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wormsigns4.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rings.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "minipiff.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "movingsand2.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "selling.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "shockwave.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "electroplosion.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fire.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fire2.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown21.png"), "12"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown22.png"), "24"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "doublemuzzle.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "muzzle.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "doubleblastmuzzle.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "minimuzzle.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown17.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown18.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown19.png"), "16"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "burst.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fire3.png"), "120"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "energy.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "reveal.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "orbit.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mushroomcloud.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mediboom3.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "largeboom.png"), "72"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rifleicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "bazookaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "engineericon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "thumpericon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sardaukaricon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "trikeicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "raidericon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "quadicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "harvestericon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combataicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combathicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "combatoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mcvicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "missiletankicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "deviatortankicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siegetankicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "sonictankicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "devasticon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "carryallicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "orniicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "fremenicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "saboteuricon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "deathhandicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conyardoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "4plateaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "4platehicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "4plateoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "6plateaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "6platehicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "6plateoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwraicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwrhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "pwroicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barraicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barrhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barroicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wallaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wallhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "walloicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntoweraicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntowerhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "guntoweroicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radaraicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radarhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radaroicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettoweraicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettowerhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "rockettoweroicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightechaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightechhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "hightechoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lightaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lighthicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lightoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "siloaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "silohicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "silooicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starportaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starporthicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starportoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchhicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palaceaicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palacehicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palaceoicon.png"), "60"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "conmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "wtrpmake.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barramake.png"), "80"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barrhmake.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "barromake.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "refmake.png"), "120"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "radarmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "highmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lightmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "silomake.png"), "32"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavymake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "starportmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "repairmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchmake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "palacemake.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "cranea.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "craneh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "craneo.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "windtrapa.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "windtraph.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "windtrapo.png"), "64"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "disha.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "dishh.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "disho.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "highweld.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "lightweld.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "heavyweld.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "unknown20.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "marker.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "researchzaps.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "deathhandlaunch.png"), "96"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "mouse.png"), "48"}, - new string[] {"--shp", Path.Combine(PathToSHPs, "spice0.png"), "32"}, + new string[] { "--shp", Path.Combine(pathToSHPs, "overlay.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairing.png"), "24" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "black.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "selectionedges.png"), "8" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar1.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar2.png"), "24" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar3.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar4.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar5.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bar6.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "dots.png"), "4" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "numbers.png"), "8" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "credits.png"), "10" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "d2kshadow.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "crates.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "spicebloom.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "stars.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "greenuparrow.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockcrater1.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockcrater2.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater1.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater2.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown2.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rifle.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rifledeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bazooka.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bazookadeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fremen.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fremendeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sardaukar.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sardaukardeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "engineer.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "engineerdeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "thumper.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "thumping.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "thumper2.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "thumperdeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "missiletank.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "trike.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "quad.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "harvester.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combata.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siegetank.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "dmcv.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sonictank.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combataturret.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siegeturret.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "carryall.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "orni.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "devast.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combathturret.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "deathhandmissile.png"), "24" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "saboteur.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "saboteurdeath.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "deviatortank.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "raider.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combato.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combatoturret.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "frigate.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavya.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radara.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwra.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barra.png"), "80" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "walla.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyarda.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refa.png"), "120" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightecha.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siloa.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repaira.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntowera.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "gunturreta.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettowera.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rocketturreta.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researcha.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starporta.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lighta.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palacea.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radarh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwrh.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wallh.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barrh.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refh.png"), "120" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightechh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siloh.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntowerh.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "gunturreth.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettowerh.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rocketturreth.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starporth.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lighth.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palaceh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyo.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radaro.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwro.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barro.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wallo.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardo.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refo.png"), "120" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightecho.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siloo.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairo.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntowero.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "gunturreto.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettowero.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rocketturreto.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researcho.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starporto.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lighto.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palaceo.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sietch.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starportc.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyc.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palacec.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardh2.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "plates.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown3.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rpg.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown4.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "missile.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "doubleblast.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bombs.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown6.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown7.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown8.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown9.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "missile2.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unload.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "harvest.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "miniboom.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mediboom.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mediboom2.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "minifire.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "miniboom2.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "minibooms.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bigboom.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bigboom2.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bigboom3.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown10.png"), "24" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown11.png"), "84" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown12.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "movingsand.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown13.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown14.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown15.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown16.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormjaw.png"), "68" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormdust.png"), "68" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormsigns1.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormsigns2.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormsigns3.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wormsigns4.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rings.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "minipiff.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "movingsand2.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "selling.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "shockwave.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "electroplosion.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fire.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fire2.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown21.png"), "12" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown22.png"), "24" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "doublemuzzle.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "muzzle.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "doubleblastmuzzle.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "minimuzzle.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown17.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown18.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown19.png"), "16" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "burst.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fire3.png"), "120" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "energy.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "reveal.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "orbit.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mushroomcloud.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mediboom3.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "largeboom.png"), "72" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rifleicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "bazookaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "engineericon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "thumpericon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sardaukaricon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "trikeicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "raidericon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "quadicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "harvestericon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combataicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combathicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "combatoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mcvicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "missiletankicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "deviatortankicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siegetankicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "sonictankicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "devasticon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "carryallicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "orniicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "fremenicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "saboteuricon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "deathhandicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conyardoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "4plateaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "4platehicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "4plateoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "6plateaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "6platehicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "6plateoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwraicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwrhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "pwroicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barraicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barrhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barroicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wallaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wallhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "walloicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntoweraicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntowerhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "guntoweroicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radaraicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radarhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radaroicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettoweraicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettowerhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "rockettoweroicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightechaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightechhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "hightechoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lightaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lighthicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lightoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "siloaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "silohicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "silooicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starportaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starporthicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starportoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchhicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palaceaicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palacehicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palaceoicon.png"), "60" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "conmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "wtrpmake.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barramake.png"), "80" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barrhmake.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "barromake.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "refmake.png"), "120" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "radarmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "highmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lightmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "silomake.png"), "32" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavymake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "starportmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "repairmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchmake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "palacemake.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "cranea.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "craneh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "craneo.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "windtrapa.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "windtraph.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "windtrapo.png"), "64" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "disha.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "dishh.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "disho.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "highweld.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "lightweld.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "heavyweld.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "unknown20.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "marker.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "researchzaps.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "deathhandlaunch.png"), "96" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "mouse.png"), "48" }, + new string[] { "--shp", Path.Combine(pathToSHPs, "spice0.png"), "32" }, }; - var SHPsToTranspose = new string[][] + var shpToTranspose = new string[][] { - new string[] {"--transpose", Path.Combine(PathToSHPs, "orni.shp"), Path.Combine(PathToSHPs, "orni.shp"), "0", "32", "3"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "rifle.shp"), Path.Combine(PathToSHPs, "rifle.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "bazooka.shp"), Path.Combine(PathToSHPs, "bazooka.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "fremen.shp"), Path.Combine(PathToSHPs, "fremen.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "sardaukar.shp"), Path.Combine(PathToSHPs, "sardaukar.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "thumper.shp"), Path.Combine(PathToSHPs, "thumper.shp"), "8", "8", "6"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "thumper2.shp"), Path.Combine(PathToSHPs, "thumper2.shp"), "8", "8", "5"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "engineer.shp"), Path.Combine(PathToSHPs, "engineer.shp"), "8", "8", "6"}, - new string[] {"--transpose", Path.Combine(PathToSHPs, "saboteur.shp"), Path.Combine(PathToSHPs, "saboteur.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5"}, + new string[] { "--transpose", Path.Combine(pathToSHPs, "orni.shp"), Path.Combine(pathToSHPs, "orni.shp"), "0", "32", "3" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "rifle.shp"), Path.Combine(pathToSHPs, "rifle.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "bazooka.shp"), Path.Combine(pathToSHPs, "bazooka.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "fremen.shp"), Path.Combine(pathToSHPs, "fremen.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "sardaukar.shp"), Path.Combine(pathToSHPs, "sardaukar.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "thumper.shp"), Path.Combine(pathToSHPs, "thumper.shp"), "8", "8", "6" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "thumper2.shp"), Path.Combine(pathToSHPs, "thumper2.shp"), "8", "8", "5" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "engineer.shp"), Path.Combine(pathToSHPs, "engineer.shp"), "8", "8", "6" }, + new string[] { "--transpose", Path.Combine(pathToSHPs, "saboteur.shp"), Path.Combine(pathToSHPs, "saboteur.shp"), "8", "8", "6", "56", "8", "5", "112", "8", "3", "136", "8", "5" }, }; var onError = (Action)(s => Game.RunAfterTick(() => { - statusLabel.GetText = () => "Error: "+s; + statusLabel.GetText = () => "Error: " + s; backButton.IsDisabled = () => false; retryButton.IsDisabled = () => false; })); - var t = new Thread( _ => + var t = new Thread(_ => { try { - for (int i = 0; i < ExtractGameFiles.Length; i++) + for (int i = 0; i < extractGameFiles.Length; i++) { - progressBar.Percentage = i*100/ExtractGameFiles.Count(); + progressBar.Percentage = i * 100 / extractGameFiles.Count(); statusLabel.GetText = () => "Extracting..."; - Utility.Command.ConvertR8ToPng(ExtractGameFiles[i]); + Utility.Command.ConvertR8ToPng(extractGameFiles[i]); } - for (int i = 0; i < SHPsToCreate.Length; i++) + for (int i = 0; i < shpToCreate.Length; i++) { - progressBar.Percentage = i*100/SHPsToCreate.Count(); + progressBar.Percentage = i * 100 / shpToCreate.Count(); statusLabel.GetText = () => "Converting..."; - Utility.Command.ConvertPngToShp(SHPsToCreate[i]); - File.Delete(SHPsToCreate[i][1]); + Utility.Command.ConvertPngToShp(shpToCreate[i]); + File.Delete(shpToCreate[i][1]); } - for (int i = 0; i < SHPsToTranspose.Length; i++) + for (int i = 0; i < shpToTranspose.Length; i++) { - progressBar.Percentage = i*100/SHPsToTranspose.Count(); + progressBar.Percentage = i * 100 / shpToTranspose.Count(); statusLabel.GetText = () => "Transposing..."; - Utility.Command.TransposeShp(SHPsToTranspose[i]); + Utility.Command.TransposeShp(shpToTranspose[i]); } statusLabel.GetText = () => "Building tilesets..."; @@ -733,19 +733,20 @@ namespace OpenRA.Mods.D2k.Widgets.Logic string[] TilesetArray = new string[] { "BASE", "BAT", "BGBS", "ICE", "TREE", "WAST" }; foreach (string set in TilesetArray) { - progressBar.Percentage = c*100/TilesetArray.Count(); - File.Delete(Path.Combine(PathToTilesets, "{0}.tsx".F(set))); - File.Copy("mods/d2k/tilesets/{0}.tsx".F(set), Path.Combine(PathToTilesets, "{0}.tsx".F(set))); - // this is ugly: a GUI will open and close immediately after some delay + progressBar.Percentage = c * 100 / TilesetArray.Count(); + File.Delete(Path.Combine(pathToTilesets, "{0}.tsx".F(set))); + File.Copy("mods/d2k/tilesets/{0}.tsx".F(set), Path.Combine(pathToTilesets, "{0}.tsx".F(set))); + + // TODO: this is ugly: a GUI will open and close immediately after some delay Process p = new Process(); - ProcessStartInfo TilesetBuilderProcessStartInfo = new ProcessStartInfo("OpenRA.TilesetBuilder.exe", Path.Combine(PathToTilesets, "{0}.png".F(set))+" 32 --export Content/d2k/Tilesets"); + ProcessStartInfo TilesetBuilderProcessStartInfo = new ProcessStartInfo("OpenRA.TilesetBuilder.exe", Path.Combine(pathToTilesets, "{0}.png".F(set)) + " 32 --export Content/d2k/Tilesets"); p.StartInfo = TilesetBuilderProcessStartInfo; p.Start(); p.WaitForExit(); - File.Delete(Path.Combine(PathToTilesets, "{0}.tsx".F(set))); - File.Delete(Path.Combine(PathToTilesets, "{0}.png".F(set))); - File.Delete(Path.Combine(PathToTilesets, "{0}.yaml".F(set.ToLower()))); - File.Delete(Path.Combine(PathToTilesets, "{0}.pal".F(set.ToLower()))); + File.Delete(Path.Combine(pathToTilesets, "{0}.tsx".F(set))); + File.Delete(Path.Combine(pathToTilesets, "{0}.png".F(set))); + File.Delete(Path.Combine(pathToTilesets, "{0}.yaml".F(set.ToLower()))); + File.Delete(Path.Combine(pathToTilesets, "{0}.pal".F(set.ToLower()))); c++; } diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs index 70772c94f0..d00498fe0a 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs @@ -14,8 +14,8 @@ using System.Linq; using System.Threading; using OpenRA.FileFormats; using OpenRA.FileFormats.Graphics; -using OpenRA.Widgets; using OpenRA.Utility; +using OpenRA.Widgets; namespace OpenRA.Mods.D2k.Widgets.Logic { @@ -51,8 +51,8 @@ namespace OpenRA.Mods.D2k.Widgets.Logic public static bool IsValidDisk(string diskRoot) { var files = new string[][] { - new [] { diskRoot, "music", "ambush.aud" }, - new [] { diskRoot, "setup", "setup.z" }, + new[] { diskRoot, "music", "ambush.aud" }, + new[] { diskRoot, "setup", "setup.z" }, }; return files.All(f => File.Exists(f.Aggregate(Path.Combine))); @@ -79,8 +79,8 @@ namespace OpenRA.Mods.D2k.Widgets.Logic installingContainer.IsVisible = () => true; var destMusic = new string[] { Platform.SupportDir, "Content", "d2k", "Music" }.Aggregate(Path.Combine); - var destData = new [] { Platform.SupportDir, "Content", "d2k" }.Aggregate(Path.Combine); - var destSound = new [] { destData, "GAMESFX" }.Aggregate(Path.Combine); + var destData = new[] { Platform.SupportDir, "Content", "d2k" }.Aggregate(Path.Combine); + var destSound = new[] { destData, "GAMESFX" }.Aggregate(Path.Combine); var copyFiles = new string[] { "music/ambush.aud", "music/arakatak.aud", "music/atregain.aud", "music/entordos.aud", "music/fightpwr.aud", "music/fremen.aud", "music/hark_bat.aud", "music/landsand.aud", "music/options.aud", "music/plotting.aud", "music/risehark.aud", "music/robotix.aud", "music/score.aud", "music/soldappr.aud", "music/spicesct.aud", "music/undercon.aud", "music/waitgame.aud" }; var extractPackage = "setup/setup.z"; @@ -123,7 +123,7 @@ namespace OpenRA.Mods.D2k.Widgets.Logic var onProgress = (Action)(s => Game.RunAfterTick(() => { - progressBar.Percentage = installCounter*100/installTotal; + progressBar.Percentage = installCounter * 100 / installTotal; installCounter++; statusLabel.GetText = () => s; @@ -131,12 +131,12 @@ namespace OpenRA.Mods.D2k.Widgets.Logic var onError = (Action)(s => Game.RunAfterTick(() => { - statusLabel.GetText = () => "Error: "+s; + statusLabel.GetText = () => "Error: " + s; backButton.IsDisabled = () => false; retryButton.IsDisabled = () => false; })); - var t = new Thread( _ => + var t = new Thread(_ => { try { diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallLogic.cs index b5ef8b5cc5..faaf5cd925 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallLogic.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.D2k.Widgets.Logic public class D2kInstallLogic { [ObjectCreator.UseCtor] - public D2kInstallLogic(Widget widget, Dictionary installData, Action continueLoading) + public D2kInstallLogic(Widget widget, Dictionary installData, Action continueLoading) { var panel = widget.Get("INSTALL_PANEL"); var args = new WidgetArgs() @@ -41,9 +41,8 @@ namespace OpenRA.Mods.D2k.Widgets.Logic panel.Get("MODS_BUTTON").OnClick = () => { Ui.OpenWindow("MODS_PANEL", new WidgetArgs() - { - { "onExit", () => {} }, - // Close this panel + { + { "onExit", () => { } }, { "onSwitch", Ui.CloseWindow }, }); }; From c2d80d21f32177f02e2c08b26a4b2773f79eaa24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 17:58:56 +0200 Subject: [PATCH 06/23] StyleCop clean Utility --- OpenRA.Utility/Command.cs | 175 ++++++++++++++++++++------------------ OpenRA.Utility/Program.cs | 4 +- 2 files changed, 93 insertions(+), 86 deletions(-) diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index 636c09e174..678a9ce830 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -55,7 +55,7 @@ namespace OpenRA.Utility ShpWriter.Write(destStream, width, srcImage.Height, srcImage.ToFrames(width)); - Console.WriteLine(dest+" saved."); + Console.WriteLine(dest + " saved."); } static IEnumerable ToFrames(this Bitmap bitmap, int width) @@ -82,15 +82,16 @@ namespace OpenRA.Utility var dest = Path.ChangeExtension(src, ".png"); var srcImage = ShpReader.Load(src); - int[] ShadowIndex = { }; + var shadowIndex = new int[] { }; if (args.Contains("--noshadow")) { - Array.Resize(ref ShadowIndex, ShadowIndex.Length + 3); - ShadowIndex[ShadowIndex.Length - 1] = 1; - ShadowIndex[ShadowIndex.Length - 2] = 3; - ShadowIndex[ShadowIndex.Length - 1] = 4; + Array.Resize(ref shadowIndex, shadowIndex.Length + 3); + shadowIndex[shadowIndex.Length - 1] = 1; + shadowIndex[shadowIndex.Length - 2] = 3; + shadowIndex[shadowIndex.Length - 1] = 4; } - var palette = Palette.Load(args[2], ShadowIndex); + + var palette = Palette.Load(args[2], shadowIndex); using (var bitmap = new Bitmap(srcImage.ImageCount * srcImage.Width, srcImage.Height, PixelFormat.Format8bppIndexed)) { @@ -112,48 +113,51 @@ namespace OpenRA.Utility } bitmap.Save(dest); - Console.WriteLine(dest+" saved"); + Console.WriteLine(dest + " saved"); } } public static void ConvertR8ToPng(string[] args) { var srcImage = new R8Reader(File.OpenRead(args[1])); - int[] ShadowIndex = { }; + var shadowIndex = new int[] { }; if (args.Contains("--noshadow")) { - Array.Resize(ref ShadowIndex, ShadowIndex.Length + 1); - ShadowIndex[ShadowIndex.Length - 1] = 3; + Array.Resize(ref shadowIndex, shadowIndex.Length + 1); + shadowIndex[shadowIndex.Length - 1] = 3; } - var palette = Palette.Load(args[2], ShadowIndex); + + var palette = Palette.Load(args[2], shadowIndex); var startFrame = int.Parse(args[3]); var endFrame = int.Parse(args[4]) + 1; var filename = args[5]; - var FrameCount = endFrame - startFrame; + var frameCount = endFrame - startFrame; var frame = srcImage[startFrame]; - var bitmap = new Bitmap(frame.FrameSize.Width * FrameCount, frame.FrameSize.Height, PixelFormat.Format8bppIndexed); + var bitmap = new Bitmap(frame.FrameSize.Width * frameCount, frame.FrameSize.Height, PixelFormat.Format8bppIndexed); bitmap.Palette = palette.AsSystemPalette(); int x = 0; frame = srcImage[startFrame]; - if (args.Contains("--infantry")) //resorting to RA/CnC compatible counter-clockwise frame order + // resorting to RA/CnC compatible counter-clockwise frame order + if (args.Contains("--infantry")) { - endFrame = startFrame-1; - for (int e = 8; e < FrameCount+1; e=e+8) //assuming 8 facings each animation set + endFrame = startFrame - 1; + + // assuming 8 facings each animation set + for (int e = 8; e < frameCount + 1; e = e + 8) { - - for (int f = startFrame+e-1; f > endFrame; f--) + for (int f = startFrame + e - 1; f > endFrame; f--) { - var OffsetX = frame.FrameSize.Width/2 - frame.Size.Width/2; - var OffsetY = frame.FrameSize.Height/2 - frame.Size.Height/2; + var offsetX = frame.FrameSize.Width / 2 - frame.Size.Width / 2; + var offsetY = frame.FrameSize.Height / 2 - frame.Size.Height / 2; - Console.WriteLine("calculated OffsetX: {0}", OffsetX); - Console.WriteLine("calculated OffsetY: {0}", OffsetY); + Console.WriteLine("calculated OffsetX: {0}", offsetX); + Console.WriteLine("calculated OffsetY: {0}", offsetY); - var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, + var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); for (var i = 0; i < frame.Size.Height; i++) @@ -167,26 +171,26 @@ namespace OpenRA.Utility frame = srcImage[f]; Console.WriteLine("f: {0}", f); } - endFrame = startFrame+e-1; - frame = srcImage[startFrame+e]; + + endFrame = startFrame + e - 1; + frame = srcImage[startFrame + e]; Console.WriteLine("e: {0}", e); - Console.WriteLine("FrameCount: {0}", FrameCount); + Console.WriteLine("FrameCount: {0}", frameCount); } } - //resorting to RA/CnC compatible counter-clockwise frame order else if (args.Contains("--vehicle") || args.Contains("--projectile")) { frame = srcImage[startFrame]; - for (int f = endFrame-1; f > startFrame-1; f--) + for (int f = endFrame - 1; f > startFrame - 1; f--) { - var OffsetX = frame.FrameSize.Width/2 - frame.Offset.X; - var OffsetY = frame.FrameSize.Height/2 - frame.Offset.Y; + var offsetX = frame.FrameSize.Width / 2 - frame.Offset.X; + var offsetY = frame.FrameSize.Height / 2 - frame.Offset.Y; - Console.WriteLine("calculated OffsetX: {0}", OffsetX); - Console.WriteLine("calculated OffsetY: {0}", OffsetY); + Console.WriteLine("calculated OffsetX: {0}", offsetX); + Console.WriteLine("calculated OffsetY: {0}", offsetY); - var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, + var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); for (var i = 0; i < frame.Size.Height; i++) @@ -200,19 +204,19 @@ namespace OpenRA.Utility frame = srcImage[f]; } } - else if (args.Contains("--turret")) //resorting to RA/CnC compatible counter-clockwise frame order + else if (args.Contains("--turret")) { frame = srcImage[startFrame]; - for (int f = endFrame-1; f > startFrame-1; f--) + for (int f = endFrame - 1; f > startFrame - 1; f--) { - var OffsetX = Math.Abs(frame.Offset.X); - var OffsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); + var offsetX = Math.Abs(frame.Offset.X); + var offsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); - Console.WriteLine("calculated OffsetX: {0}", OffsetX); - Console.WriteLine("calculated OffsetY: {0}", OffsetY); + Console.WriteLine("calculated OffsetX: {0}", offsetX); + Console.WriteLine("calculated OffsetY: {0}", offsetY); - var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, + var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); for (var i = 0; i < frame.Size.Height; i++) @@ -226,21 +230,22 @@ namespace OpenRA.Utility frame = srcImage[f]; } } - else if (args.Contains("--wall")) //complex resorting to RA/CnC compatible frame order + else if (args.Contains("--wall")) { - int[] D2kBrikFrameOrder = {1, 4, 2, 12, 5, 6, 16, 9, 3, 13, 7, 8, 14, 10, 11, 15, 17, 20, 18, 28, 21, 22, 32, 25, 19, 29, 23, 24, 30, 26, 27, 31}; - foreach (int o in D2kBrikFrameOrder) + // complex resorting to RA/CnC compatible frame order + var d2kBrikFrameOrder = new int[] { 1, 4, 2, 12, 5, 6, 16, 9, 3, 13, 7, 8, 14, 10, 11, 15, 17, 20, 18, 28, 21, 22, 32, 25, 19, 29, 23, 24, 30, 26, 27, 31 }; + foreach (int o in d2kBrikFrameOrder) { - int f = startFrame -1 + o; + var f = startFrame - 1 + o; frame = srcImage[f]; - var OffsetX = Math.Abs(frame.Offset.X); - var OffsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); - Console.WriteLine("calculated OffsetX: {0}", OffsetX); - Console.WriteLine("calculated OffsetY: {0}", OffsetY); + var offsetX = Math.Abs(frame.Offset.X); + var offsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); + Console.WriteLine("calculated OffsetX: {0}", offsetX); + Console.WriteLine("calculated OffsetY: {0}", offsetY); - var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, + var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); for (var i = 0; i < frame.Size.Height; i++) @@ -262,7 +267,7 @@ namespace OpenRA.Utility { for (int w = 0; w < 20; w++) { - if (h * 20 + w < FrameCount) + if (h * 20 + w < frameCount) { Console.WriteLine(f); frame = srcImage[f]; @@ -279,6 +284,7 @@ namespace OpenRA.Utility } } } + bitmap = tileset; } else @@ -286,22 +292,23 @@ namespace OpenRA.Utility for (int f = startFrame; f < endFrame; f++) { frame = srcImage[f]; - int OffsetX = 0; - int OffsetY = 0; + var offsetX = 0; + var offsetY = 0; if (args.Contains("--infantrydeath")) { - OffsetX = frame.FrameSize.Width/2 - frame.Size.Width/2; - OffsetY = frame.FrameSize.Height/2 - frame.Size.Height/2; + offsetX = frame.FrameSize.Width / 2 - frame.Size.Width / 2; + offsetY = frame.FrameSize.Height / 2 - frame.Size.Height / 2; } else if (args.Contains("--building")) { - OffsetX = Math.Abs(frame.Offset.X); - OffsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); + offsetX = Math.Abs(frame.Offset.X); + offsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y); } - Console.WriteLine("calculated OffsetX: {0}", OffsetX); - Console.WriteLine("calculated OffsetY: {0}", OffsetY); - var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, + Console.WriteLine("calculated OffsetX: {0}", offsetX); + Console.WriteLine("calculated OffsetY: {0}", offsetY); + + var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); for (var i = 0; i < frame.Size.Height; i++) @@ -313,8 +320,9 @@ namespace OpenRA.Utility x += frame.FrameSize.Width; } } - bitmap.Save(filename+".png"); - Console.WriteLine(filename+".png saved"); + + bitmap.Save(filename + ".png"); + Console.WriteLine(filename + ".png saved"); } public static void ConvertTmpToPng(string[] args) @@ -322,21 +330,21 @@ namespace OpenRA.Utility var mods = args[1].Split(','); var theater = args[2]; var templateNames = args.Skip(3); - int[] ShadowIndex = { 3, 4 }; + var shadowIndex = new int[] { 3, 4 }; var manifest = new Manifest(mods); FileSystem.LoadFromManifest(manifest); - var tileset = manifest.TileSets.Select( a => new TileSet(a) ) - .FirstOrDefault( ts => ts.Name == theater ); + var tileset = manifest.TileSets.Select(a => new TileSet(a)) + .FirstOrDefault(ts => ts.Name == theater); if (tileset == null) throw new InvalidOperationException("No theater named '{0}'".F(theater)); tileset.LoadTiles(); - var palette = new Palette(FileSystem.Open(tileset.Palette), ShadowIndex); + var palette = new Palette(FileSystem.Open(tileset.Palette), shadowIndex); - foreach( var templateName in templateNames ) + foreach (var templateName in templateNames) { var template = tileset.Templates.FirstOrDefault(tt => tt.Value.Image == templateName); if (template.Value == null) @@ -353,7 +361,7 @@ namespace OpenRA.Utility var dest = args[2]; Dune2ShpReader srcImage = null; - using(var s = File.OpenRead(src)) + using (var s = File.OpenRead(src)) srcImage = new Dune2ShpReader(s); var size = srcImage.First().Size; @@ -383,9 +391,9 @@ namespace OpenRA.Utility if (src == null) throw new InvalidOperationException("File not found: {0}".F(f)); var data = src.ReadAllBytes(); - var output = args.Contains("--userdir") ? Platform.SupportDir+f : f; + var output = args.Contains("--userdir") ? Platform.SupportDir + f : f; File.WriteAllBytes(output, data); - Console.WriteLine(output+" saved."); + Console.WriteLine(output + " saved."); } } @@ -401,7 +409,7 @@ namespace OpenRA.Utility public static void RemapShp(string[] args) { - var remap = new Dictionary(); + var remap = new Dictionary(); /* the first 4 entries are fixed */ for (var i = 0; i < 4; i++) @@ -419,17 +427,17 @@ namespace OpenRA.Utility FileSystem.LoadFromManifest(Game.modData.Manifest); Rules.LoadRules(Game.modData.Manifest, new Map()); var destPaletteInfo = Rules.Info["player"].Traits.Get(); - int[] destRemapIndex = destPaletteInfo.RemapIndex; + var destRemapIndex = destPaletteInfo.RemapIndex; + var shadowIndex = new int[] { }; - int[] ShadowIndex = { }; // the remap range is always 16 entries, but their location and order changes for (var i = 0; i < 16; i++) remap[PlayerColorRemap.GetRemapIndex(srcRemapIndex, i)] = PlayerColorRemap.GetRemapIndex(destRemapIndex, i); // map everything else to the best match based on channel-wise distance - var srcPalette = Palette.Load(args[1].Split(':')[1], ShadowIndex); - var destPalette = Palette.Load(args[2].Split(':')[1], ShadowIndex); + var srcPalette = Palette.Load(args[1].Split(':')[1], shadowIndex); + var destPalette = Palette.Load(args[2].Split(':')[1], shadowIndex); var fullIndexRange = Exts.MakeArray(256, x => x); @@ -444,10 +452,9 @@ namespace OpenRA.Utility using (var destStream = File.Create(args[4])) ShpWriter.Write(destStream, srcImage.Width, srcImage.Height, - srcImage.Frames.Select( im => im.Image.Select(px => (byte)remap[px]).ToArray() )); + srcImage.Frames.Select(im => im.Image.Select(px => (byte)remap[px]).ToArray())); } - //This is needed because the run and shoot animation are next to each other for each sequence in RA/CnC, but not in D2k. public static void TransposeShp(string[] args) { var srcImage = ShpReader.Load(args[1]); @@ -455,18 +462,18 @@ namespace OpenRA.Utility var srcFrames = srcImage.Frames.ToArray(); var destFrames = srcImage.Frames.ToArray(); - for( var z = 3; z < args.Length - 2; z += 3 ) + for (var z = 3; z < args.Length - 2; z += 3) { var start = int.Parse(args[z]); - var m = int.Parse(args[z+1]); - var n = int.Parse(args[z+2]); + var m = int.Parse(args[z + 1]); + var n = int.Parse(args[z + 2]); - for( var i = 0; i < m; i++ ) - for( var j = 0; j < n; j++ ) - destFrames[ start + i*n + j ] = srcFrames[ start + j*m + i ]; + for (var i = 0; i < m; i++) + for (var j = 0; j < n; j++) + destFrames[start + i * n + j] = srcFrames[start + j * m + i]; } - using( var destStream = File.Create(args[2]) ) + using (var destStream = File.Create(args[2])) ShpWriter.Write(destStream, srcImage.Width, srcImage.Height, destFrames.Select(f => f.Image)); } diff --git a/OpenRA.Utility/Program.cs b/OpenRA.Utility/Program.cs index d891ef2218..9f63d468eb 100644 --- a/OpenRA.Utility/Program.cs +++ b/OpenRA.Utility/Program.cs @@ -38,10 +38,10 @@ namespace OpenRA.Utility try { - var action = Exts.WithDefault( _ => PrintUsage(), () => actions[args[0]]); + var action = Exts.WithDefault(_ => PrintUsage(), () => actions[args[0]]); action(args); } - catch( Exception e ) + catch (Exception e) { Log.AddChannel("utility", "utility.log"); Log.Write("utility", "Received args: {0}", args.JoinWith(" ")); From c49ddefbe0986db4d9ab9018199292f78450ab44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 7 Aug 2013 14:25:40 +0200 Subject: [PATCH 07/23] don't clobber the shadow index twice --- OpenRA.Utility/Command.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index 678a9ce830..168d3cc58c 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -88,7 +88,7 @@ namespace OpenRA.Utility Array.Resize(ref shadowIndex, shadowIndex.Length + 3); shadowIndex[shadowIndex.Length - 1] = 1; shadowIndex[shadowIndex.Length - 2] = 3; - shadowIndex[shadowIndex.Length - 1] = 4; + shadowIndex[shadowIndex.Length - 3] = 4; } var palette = Palette.Load(args[2], shadowIndex); From bcce9ea7f036ace6c832cb3f62e817d3e379417f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 17:59:36 +0200 Subject: [PATCH 08/23] StyleCop clean RALint --- RALint/RALint.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RALint/RALint.cs b/RALint/RALint.cs index 759b227918..ead78bede1 100644 --- a/RALint/RALint.cs +++ b/RALint/RALint.cs @@ -38,7 +38,7 @@ namespace RALint var options = args.Where(a => a.StartsWith("-")); var mods = args.Where(a => !options.Contains(a)).ToArray(); - var verbose = options.Contains( "-v" ) || options.Contains( "--verbose" ); + var verbose = options.Contains("-v") || options.Contains("--verbose"); // bind some nonfatal error handling into FieldLoader, so we don't just *explode*. ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s)); @@ -61,7 +61,7 @@ namespace RALint customPass.Run(EmitError, EmitWarning); } - catch(Exception e) + catch (Exception e) { EmitError("Failed with exception: {0}".F(e)); } From d278bc84d1fd285704e7985c6648a1926d3a593a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 18:14:54 +0200 Subject: [PATCH 09/23] StyleCop clean Cnc DLL --- OpenRA.Mods.Cnc/CncLoadScreen.cs | 55 +++++---- OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs | 4 +- OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs | 40 +++---- OpenRA.Mods.Cnc/Missions/Gdi01Script.cs | 104 +++++++++--------- OpenRA.Mods.Cnc/Missions/Nod01Script.cs | 10 +- OpenRA.Mods.Cnc/PoisonedByTiberium.cs | 6 +- .../ProductionQueueFromSelection.cs | 4 +- OpenRA.Mods.Cnc/SpawnViceroid.cs | 16 +-- OpenRA.Mods.Cnc/TiberiumRefinery.cs | 3 +- .../Widgets/Logic/ButtonTooltipLogic.cs | 5 +- .../Widgets/Logic/CncIngameChromeLogic.cs | 24 ++-- .../Widgets/Logic/CncIngameMenuLogic.cs | 22 ++-- .../Widgets/Logic/CncInstallFromCDLogic.cs | 12 +- .../Widgets/Logic/CncInstallLogic.cs | 5 +- OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs | 48 ++++---- .../Widgets/Logic/CncSettingsLogic.cs | 64 +++++------ .../Widgets/Logic/ProductionTabsLogic.cs | 6 +- .../Widgets/Logic/ProductionTooltipLogic.cs | 19 ++-- .../Widgets/Logic/SupportPowerTooltipLogic.cs | 7 +- .../Widgets/ProductionPaletteWidget.cs | 60 +++++----- .../Widgets/ProductionTabsWidget.cs | 46 ++++---- .../Widgets/ProductionTypeButtonWidget.cs | 2 +- .../Widgets/SupportPowersWidget.cs | 48 ++++---- OpenRA.Mods.Cnc/WithCargo.cs | 12 +- 24 files changed, 315 insertions(+), 307 deletions(-) diff --git a/OpenRA.Mods.Cnc/CncLoadScreen.cs b/OpenRA.Mods.Cnc/CncLoadScreen.cs index 8d2c2de1ae..5c96d4959e 100644 --- a/OpenRA.Mods.Cnc/CncLoadScreen.cs +++ b/OpenRA.Mods.Cnc/CncLoadScreen.cs @@ -19,19 +19,19 @@ namespace OpenRA.Mods.Cnc { public class CncLoadScreen : ILoadScreen { - Dictionary Info; + Dictionary loadInfo; Stopwatch loadTimer = new Stopwatch(); Sprite[] ss; int loadTick; float2 nodPos, gdiPos, evaPos; Sprite nodLogo, gdiLogo, evaLogo, brightBlock, dimBlock; - Rectangle Bounds; + Rectangle bounds; Renderer r; NullInputHandler nih = new NullInputHandler(); public void Init(Dictionary info) { - Info = info; + loadInfo = info; // Avoid standard loading mechanisms so we // can display loadscreen as early as possible @@ -40,26 +40,26 @@ namespace OpenRA.Mods.Cnc var s = new Sheet("mods/cnc/uibits/chrome.png"); var res = Renderer.Resolution; - Bounds = new Rectangle(0, 0, res.Width, res.Height); + bounds = new Rectangle(0, 0, res.Width, res.Height); - ss = new [] + ss = new[] { - new Sprite(s, new Rectangle(161,128,62,33), TextureChannel.Alpha), - new Sprite(s, new Rectangle(161,223,62,33), TextureChannel.Alpha), - new Sprite(s, new Rectangle(128,161,33,62), TextureChannel.Alpha), - new Sprite(s, new Rectangle(223,161,33,62), TextureChannel.Alpha), - new Sprite(s, new Rectangle(128,128,33,33), TextureChannel.Alpha), - new Sprite(s, new Rectangle(223,128,33,33), TextureChannel.Alpha), - new Sprite(s, new Rectangle(128,223,33,33), TextureChannel.Alpha), - new Sprite(s, new Rectangle(223,223,33,33), TextureChannel.Alpha) + new Sprite(s, new Rectangle(161, 128, 62, 33), TextureChannel.Alpha), + new Sprite(s, new Rectangle(161, 223, 62, 33), TextureChannel.Alpha), + new Sprite(s, new Rectangle(128, 161, 33, 62), TextureChannel.Alpha), + new Sprite(s, new Rectangle(223, 161, 33, 62), TextureChannel.Alpha), + new Sprite(s, new Rectangle(128, 128, 33, 33), TextureChannel.Alpha), + new Sprite(s, new Rectangle(223, 128, 33, 33), TextureChannel.Alpha), + new Sprite(s, new Rectangle(128, 223, 33, 33), TextureChannel.Alpha), + new Sprite(s, new Rectangle(223, 223, 33, 33), TextureChannel.Alpha) }; nodLogo = new Sprite(s, new Rectangle(0, 256, 256, 256), TextureChannel.Alpha); gdiLogo = new Sprite(s, new Rectangle(256, 256, 256, 256), TextureChannel.Alpha); evaLogo = new Sprite(s, new Rectangle(256, 64, 128, 64), TextureChannel.Alpha); - nodPos = new float2(Bounds.Width / 2 - 384, Bounds.Height / 2 - 128); - gdiPos = new float2(Bounds.Width / 2 + 128, Bounds.Height / 2 - 128); - evaPos = new float2(Bounds.Width - 43 - 128, 43); + nodPos = new float2(bounds.Width / 2 - 384, bounds.Height / 2 - 128); + gdiPos = new float2(bounds.Width / 2 + 128, bounds.Height / 2 - 128); + evaPos = new float2(bounds.Width - 43 - 128, 43); brightBlock = new Sprite(s, new Rectangle(320, 0, 16, 35), TextureChannel.Alpha); dimBlock = new Sprite(s, new Rectangle(336, 0, 16, 35), TextureChannel.Alpha); @@ -83,19 +83,19 @@ namespace OpenRA.Mods.Cnc r.RgbaSpriteRenderer.DrawSprite(nodLogo, nodPos); r.RgbaSpriteRenderer.DrawSprite(evaLogo, evaPos); - WidgetUtils.DrawPanelPartial(ss, Bounds, PanelSides.Edges); - var barY = Bounds.Height - 78; + WidgetUtils.DrawPanelPartial(ss, bounds, PanelSides.Edges); + var barY = bounds.Height - 78; if (!setup && r.Fonts != null) { loadingFont = r.Fonts["BigBold"]; loadingText = "Loading"; - loadingPos = new float2((Bounds.Width - loadingFont.Measure(loadingText).X) / 2, barY); + loadingPos = new float2((bounds.Width - loadingFont.Measure(loadingText).X) / 2, barY); versionFont = r.Fonts["Regular"]; versionText = WidgetUtils.ActiveModVersion(); var versionSize = versionFont.Measure(versionText); - versionPos = new float2(Bounds.Width - 107 - versionSize.X/2, 115 - versionSize.Y/2); + versionPos = new float2(bounds.Width - 107 - versionSize.X / 2, 115 - versionSize.Y / 2); setup = true; } @@ -109,9 +109,9 @@ namespace OpenRA.Mods.Cnc { var block = loadTick == i ? brightBlock : dimBlock; r.RgbaSpriteRenderer.DrawSprite(block, - new float2(Bounds.Width / 2 - 114 - i * 32, barY)); + new float2(bounds.Width / 2 - 114 - i * 32, barY)); r.RgbaSpriteRenderer.DrawSprite(block, - new float2(Bounds.Width / 2 + 114 + i * 32 - 16, barY)); + new float2(bounds.Width / 2 + 114 + i * 32 - 16, barY)); } r.EndFrame(nih); @@ -125,19 +125,18 @@ namespace OpenRA.Mods.Cnc void TestAndContinue() { Ui.ResetAll(); - if (!FileSystem.Exists(Info["TestFile"])) + if (!FileSystem.Exists(loadInfo["TestFile"])) { var args = new WidgetArgs() { { "continueLoading", () => TestAndContinue() }, - { "installData", Info } + { "installData", loadInfo } }; - Ui.LoadWidget(Info["InstallerBackgroundWidget"], Ui.Root, args); - Ui.OpenWindow(Info["InstallerMenuWidget"], args); + Ui.LoadWidget(loadInfo["InstallerBackgroundWidget"], Ui.Root, args); + Ui.OpenWindow(loadInfo["InstallerMenuWidget"], args); } else Game.LoadShellMap(); } } -} - +} \ No newline at end of file diff --git a/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs b/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs index 71ee66a307..e3cbe78313 100644 --- a/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs +++ b/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs @@ -49,7 +49,7 @@ namespace OpenRA.Mods.Cnc Color ColorForEffect(EffectType t, Color orig) { - switch(t) + switch (t) { case EffectType.Black: return Color.FromArgb(orig.A, Color.Black); @@ -62,7 +62,7 @@ namespace OpenRA.Mods.Cnc } } - public void AdjustPalette(Dictionary palettes) + public void AdjustPalette(Dictionary palettes) { if (to == EffectType.None && remainingFrames == 0) return; diff --git a/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs b/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs index 7086c416cd..c56c0dd91f 100755 --- a/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs +++ b/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs @@ -19,18 +19,18 @@ namespace OpenRA.Mods.RA { class CncShellmapScriptInfo : TraitInfo { } - class CncShellmapScript: IWorldLoaded, ITick + class CncShellmapScript : IWorldLoaded, ITick { - Dictionary Actors; - static CPos ViewportOrigin; + static CPos viewportOrigin; + Dictionary actors; public void WorldLoaded(World w) { var b = w.Map.Bounds; - ViewportOrigin = new CPos(b.Left + b.Width/2, b.Top + b.Height/2); - Game.MoveViewport(ViewportOrigin.ToFloat2()); + viewportOrigin = new CPos(b.Left + b.Width / 2, b.Top + b.Height / 2); + Game.MoveViewport(viewportOrigin.ToFloat2()); - Actors = w.WorldActor.Trait().Actors; + actors = w.WorldActor.Trait().Actors; SetViewport(); } @@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA void SetViewport() { var t = (ticks + 45) % (360f * speed) * (Math.PI / 180) * 1f / speed; - var loc = ViewportOrigin.ToFloat2() + (new float2(-15,4) * float2.FromAngle( (float)t )); + var loc = viewportOrigin.ToFloat2() + (new float2(-15, 4) * float2.FromAngle((float)t)); Game.viewport.Center(loc); } @@ -51,16 +51,16 @@ namespace OpenRA.Mods.RA if (ticks == 0) { - LoopTrack(Actors["boat1"], Actors["tl1"].Location, Actors["tr1"].Location); - LoopTrack(Actors["boat3"], Actors["tl1"].Location, Actors["tr1"].Location); - LoopTrack(Actors["boat2"], Actors["tl3"].Location, Actors["tr3"].Location); - LoopTrack(Actors["boat4"], Actors["tl3"].Location, Actors["tr3"].Location); - CreateUnitsInTransport(Actors["lst1"], new string[] {"htnk"}); - CreateUnitsInTransport(Actors["lst2"], new string[] {"mcv"}); - CreateUnitsInTransport(Actors["lst3"], new string[] {"htnk"}); - LoopTrack(Actors["lst1"], Actors["tl2"].Location, Actors["tr2"].Location); - LoopTrack(Actors["lst2"], Actors["tl2"].Location, Actors["tr2"].Location); - LoopTrack(Actors["lst3"], Actors["tl2"].Location, Actors["tr2"].Location); + LoopTrack(actors["boat1"], actors["tl1"].Location, actors["tr1"].Location); + LoopTrack(actors["boat3"], actors["tl1"].Location, actors["tr1"].Location); + LoopTrack(actors["boat2"], actors["tl3"].Location, actors["tr3"].Location); + LoopTrack(actors["boat4"], actors["tl3"].Location, actors["tr3"].Location); + CreateUnitsInTransport(actors["lst1"], new string[] { "htnk" }); + CreateUnitsInTransport(actors["lst2"], new string[] { "mcv" }); + CreateUnitsInTransport(actors["lst3"], new string[] { "htnk" }); + LoopTrack(actors["lst1"], actors["tl2"].Location, actors["tr2"].Location); + LoopTrack(actors["lst2"], actors["tl2"].Location, actors["tr2"].Location); + LoopTrack(actors["lst3"], actors["tl2"].Location, actors["tr2"].Location); } ticks++; @@ -73,8 +73,8 @@ namespace OpenRA.Mods.RA foreach (var i in cargo) c.Load(transport, transport.World.CreateActor(false, i.ToLowerInvariant(), new TypeDictionary { - new OwnerInit( transport.Owner ), - new FacingInit( f.Facing ), + new OwnerInit(transport.Owner), + new FacingInit(f.Facing), })); } @@ -83,7 +83,7 @@ namespace OpenRA.Mods.RA var mobile = self.Trait(); self.QueueActivity(mobile.ScriptedMove(left)); self.QueueActivity(new SimpleTeleport(right)); - self.QueueActivity(new CallFunc(() => LoopTrack(self,left,right))); + self.QueueActivity(new CallFunc(() => LoopTrack(self, left, right))); } } } diff --git a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs index 97fc4f0c66..6261f6689a 100644 --- a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs @@ -15,25 +15,25 @@ using OpenRA.FileFormats; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; +using OpenRA.Scripting; using OpenRA.Traits; using OpenRA.Widgets; -using OpenRA.Scripting; namespace OpenRA.Mods.Cnc.Missions { class Gdi01ScriptInfo : TraitInfo { } - class Gdi01Script: IWorldLoaded, ITick + class Gdi01Script : IWorldLoaded, ITick { - Dictionary Actors; - Dictionary Players; + Dictionary actors; + Dictionary players; public void WorldLoaded(World w) { - Players = w.Players.ToDictionary(p => p.InternalName); - Actors = w.WorldActor.Trait().Actors; + players = w.Players.ToDictionary(p => p.InternalName); + actors = w.WorldActor.Trait().Actors; var b = w.Map.Bounds; - Game.MoveViewport(new CPos(b.Left + b.Width/2, b.Top + b.Height/2).ToFloat2()); + Game.MoveViewport(new CPos(b.Left + b.Width / 2, b.Top + b.Height / 2).ToFloat2()); Action afterFMV = () => { @@ -48,10 +48,10 @@ namespace OpenRA.Mods.Cnc.Missions { Action afterFMV = () => { - Players["GoodGuy"].WinState = WinState.Won; + players["GoodGuy"].WinState = WinState.Won; started = false; Sound.StopMusic(); - Sound.PlayToPlayer(Players["GoodGuy"], "accom1.aud"); + Sound.PlayToPlayer(players["GoodGuy"], "accom1.aud"); }; Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(w, "consyard.vqa", afterFMV)); } @@ -60,10 +60,10 @@ namespace OpenRA.Mods.Cnc.Missions { Action afterFMV = () => { - Players["GoodGuy"].WinState = WinState.Lost; + players["GoodGuy"].WinState = WinState.Lost; started = false; Sound.StopMusic(); - Sound.PlayToPlayer(Players["GoodGuy"], "fail1.aud"); + Sound.PlayToPlayer(players["GoodGuy"], "fail1.aud"); }; Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(w, "gameover.vqa", afterFMV)); } @@ -82,27 +82,29 @@ namespace OpenRA.Mods.Cnc.Missions SetGunboatPath(); self.World.AddFrameEndTask(w => { - //Initial Nod reinforcements - foreach (var i in new[]{ "e1", "e1" }) + // Initial Nod reinforcements + foreach (var i in new[] { "e1", "e1" }) { var a = self.World.CreateActor(i.ToLowerInvariant(), new TypeDictionary { - new OwnerInit(Players["BadGuy"]), + new OwnerInit(players["BadGuy"]), new FacingInit(0), - new LocationInit(Actors["nod0"].Location), + new LocationInit(actors["nod0"].Location), }); var mobile = a.Trait(); - a.QueueActivity(mobile.MoveTo(Actors["nod1"].Location, 2 )); - a.QueueActivity(mobile.MoveTo(Actors["nod2"].Location, 2 )); - a.QueueActivity(mobile.MoveTo(Actors["nod3"].Location, 2 )); + a.QueueActivity(mobile.MoveTo(actors["nod1"].Location, 2)); + a.QueueActivity(mobile.MoveTo(actors["nod2"].Location, 2)); + a.QueueActivity(mobile.MoveTo(actors["nod3"].Location, 2)); + // TODO: Queue hunt order } }); } + // GoodGuy win conditions // BadGuy is dead var badcount = self.World.Actors.Count(a => a != a.Owner.PlayerActor && - a.Owner == Players["BadGuy"] && !a.IsDead()); + a.Owner == players["BadGuy"] && !a.IsDead()); if (badcount != lastBadCount) { Game.Debug("{0} badguys remain".F(badcount)); @@ -112,51 +114,51 @@ namespace OpenRA.Mods.Cnc.Missions OnVictory(self.World); } - //GoodGuy lose conditions: MCV/cyard must survive + // GoodGuy lose conditions: MCV/cyard must survive var hasAnything = self.World.ActorsWithTrait() - .Any( a => a.Actor.Owner == Players["GoodGuy"] ); + .Any(a => a.Actor.Owner == players["GoodGuy"]); if (!hasAnything) OnLose(self.World); // GoodGuy reinforcements - if (ticks == 25*5) + if (ticks == 25 * 5) { ReinforceFromSea(self.World, - Actors["lstStart"].Location, - Actors["lstEnd"].Location, + actors["lstStart"].Location, + actors["lstEnd"].Location, new CPos(53, 53), - new string[] {"e1","e1","e1"}, - Players["GoodGuy"]); + new string[] { "e1", "e1", "e1" }, + players["GoodGuy"]); } - if (ticks == 25*15) + if (ticks == 25 * 15) { ReinforceFromSea(self.World, - Actors["lstStart"].Location, - Actors["lstEnd"].Location, + actors["lstStart"].Location, + actors["lstEnd"].Location, new CPos(53, 53), - new string[] {"e1","e1","e1"}, - Players["GoodGuy"]); + new string[] { "e1", "e1", "e1" }, + players["GoodGuy"]); } - if (ticks == 25*30) + if (ticks == 25 * 30) { ReinforceFromSea(self.World, - Actors["lstStart"].Location, - Actors["lstEnd"].Location, + actors["lstStart"].Location, + actors["lstEnd"].Location, new CPos(53, 53), - new string[] {"jeep"}, - Players["GoodGuy"]); + new string[] { "jeep" }, + players["GoodGuy"]); } - if (ticks == 25*60) + if (ticks == 25 * 60) { ReinforceFromSea(self.World, - Actors["lstStart"].Location, - Actors["lstEnd"].Location, + actors["lstStart"].Location, + actors["lstEnd"].Location, new CPos(53, 53), - new string[] {"jeep"}, - Players["GoodGuy"]); + new string[] { "jeep" }, + players["GoodGuy"]); } ticks++; @@ -164,11 +166,11 @@ namespace OpenRA.Mods.Cnc.Missions void SetGunboatPath() { - var self = Actors[ "Gunboat" ]; + var self = actors["Gunboat"]; var mobile = self.Trait(); - self.Trait().stance = UnitStance.AttackAnything; //TODO: this is ignored - self.QueueActivity(mobile.ScriptedMove(Actors["gunboatLeft"].Location)); - self.QueueActivity(mobile.ScriptedMove(Actors["gunboatRight"].Location)); + self.Trait().stance = UnitStance.AttackAnything; // TODO: this is ignored + self.QueueActivity(mobile.ScriptedMove(actors["gunboatLeft"].Location)); + self.QueueActivity(mobile.ScriptedMove(actors["gunboatRight"].Location)); self.QueueActivity(new CallFunc(() => SetGunboatPath())); } @@ -176,13 +178,13 @@ namespace OpenRA.Mods.Cnc.Missions { world.AddFrameEndTask(w => { - Sound.PlayToPlayer(w.LocalPlayer,"reinfor1.aud"); + Sound.PlayToPlayer(w.LocalPlayer, "reinfor1.aud"); var a = w.CreateActor("lst", new TypeDictionary { - new LocationInit( startPos ), - new OwnerInit( player ), - new FacingInit( 0 ), + new LocationInit(startPos), + new OwnerInit(player), + new FacingInit(0), }); var mobile = a.Trait(); @@ -190,8 +192,8 @@ namespace OpenRA.Mods.Cnc.Missions foreach (var i in items) cargo.Load(a, world.CreateActor(false, i.ToLowerInvariant(), new TypeDictionary { - new OwnerInit( player ), - new FacingInit( 0 ), + new OwnerInit(player), + new FacingInit(0), })); a.CancelActivity(); diff --git a/OpenRA.Mods.Cnc/Missions/Nod01Script.cs b/OpenRA.Mods.Cnc/Missions/Nod01Script.cs index 0fa3cfaa12..be8b23def6 100644 --- a/OpenRA.Mods.Cnc/Missions/Nod01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Nod01Script.cs @@ -11,16 +11,16 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenRA.FileFormats; using OpenRA.Mods.Cnc; using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Air; -using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Missions; +using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Buildings; +using OpenRA.Mods.RA.Missions; +using OpenRA.Mods.RA.Move; using OpenRA.Scripting; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.Cnc.Missions { @@ -90,6 +90,7 @@ namespace OpenRA.Mods.Cnc.Missions NODReinforceNthA(); Sound.Play("reinfor1.aud"); } + if (world.FrameNumber == 1400) { NODReinforceNthB(); @@ -107,6 +108,7 @@ namespace OpenRA.Mods.Cnc.Missions Sound.Play("reinfor1.aud"); } } + if (levelvillage.Status == ObjectiveStatus.InProgress) { if (vil01.Destroyed && vil02.Destroyed && vil03.Destroyed && vil04.Destroyed && vil05.Destroyed && vil06.Destroyed && diff --git a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs index 3bdb6330bf..8792168f5e 100644 --- a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs +++ b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs @@ -34,12 +34,12 @@ namespace OpenRA.Mods.Cnc var rl = self.World.WorldActor.Trait(); var r = rl.GetResource(self.Location); - if( r == null ) return; - if( !info.Resources.Contains(r.info.Name) ) return; + if (r == null) return; + if (!info.Resources.Contains(r.info.Name)) return; var weapon = Rules.Weapons[info.Weapon.ToLowerInvariant()]; - self.InflictDamage( self.World.WorldActor, weapon.Warheads[ 0 ].Damage, weapon.Warheads[ 0 ] ); + self.InflictDamage(self.World.WorldActor, weapon.Warheads[0].Damage, weapon.Warheads[0]); poisonTicks = weapon.ROF; } } diff --git a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs index 938cef99cb..8d2c4cb97e 100644 --- a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs +++ b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs @@ -20,13 +20,13 @@ namespace OpenRA.Mods.Cnc.Widgets { public string ProductionTabsWidget = null; - public object Create( ActorInitializer init ) { return new ProductionQueueFromSelection(init.world, this); } + public object Create(ActorInitializer init) { return new ProductionQueueFromSelection(init.world, this); } } class ProductionQueueFromSelection : INotifySelection { - Lazy tabsWidget; readonly World world; + Lazy tabsWidget; public ProductionQueueFromSelection(World world, ProductionQueueFromSelectionInfo info) { diff --git a/OpenRA.Mods.Cnc/SpawnViceroid.cs b/OpenRA.Mods.Cnc/SpawnViceroid.cs index b7f584abe2..d385da15d3 100644 --- a/OpenRA.Mods.Cnc/SpawnViceroid.cs +++ b/OpenRA.Mods.Cnc/SpawnViceroid.cs @@ -26,28 +26,28 @@ namespace OpenRA.Mods.Cnc class SpawnViceroid : INotifyKilled { - readonly SpawnViceroidInfo Info; + readonly SpawnViceroidInfo spawnViceroidInfo; - public SpawnViceroid(SpawnViceroidInfo info) { Info = info; } + public SpawnViceroid(SpawnViceroidInfo info) { spawnViceroidInfo = info; } public void Killed(Actor self, AttackInfo e) { - if (e.Warhead == null || e.Warhead.InfDeath != Info.InfDeath) return; - if (self.World.SharedRandom.Next(100) > Info.Probability) return; + if (e.Warhead == null || e.Warhead.InfDeath != spawnViceroidInfo.InfDeath) return; + if (self.World.SharedRandom.Next(100) > spawnViceroidInfo.Probability) return; self.World.AddFrameEndTask(w => { var td = new TypeDictionary { - new LocationInit( self.Location ), - new OwnerInit( self.World.Players.First(p => p.InternalName == Info.Owner) ) + new LocationInit(self.Location), + new OwnerInit(self.World.Players.First(p => p.InternalName == spawnViceroidInfo.Owner)) }; var facing = self.TraitOrDefault(); if (facing != null) - td.Add(new FacingInit( facing.Facing )); + td.Add(new FacingInit(facing.Facing)); - w.CreateActor(Info.ViceroidActor, td); + w.CreateActor(spawnViceroidInfo.ViceroidActor, td); }); } } diff --git a/OpenRA.Mods.Cnc/TiberiumRefinery.cs b/OpenRA.Mods.Cnc/TiberiumRefinery.cs index 49a77be9ea..ef0729cf33 100644 --- a/OpenRA.Mods.Cnc/TiberiumRefinery.cs +++ b/OpenRA.Mods.Cnc/TiberiumRefinery.cs @@ -20,8 +20,7 @@ namespace OpenRA.Mods.Cnc public class TiberiumRefinery : OreRefinery { - public TiberiumRefinery(Actor self, TiberiumRefineryInfo info) - : base(self, info) {} + public TiberiumRefinery(Actor self, TiberiumRefineryInfo info) : base(self, info) { } public override Activity DockSequence(Actor harv, Actor self) { diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/ButtonTooltipLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/ButtonTooltipLogic.cs index 32d9a57cda..713bdc578b 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/ButtonTooltipLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/ButtonTooltipLogic.cs @@ -26,12 +26,11 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var hotkeyLabel = "({0})".F(button.Key.ToUpperInvariant()); hotkey.GetText = () => hotkeyLabel; - hotkey.Bounds.X = labelWidth + 2*label.Bounds.X; + hotkey.Bounds.X = labelWidth + 2 * label.Bounds.X; var panelWidth = hotkey.Bounds.X + label.Bounds.X + Game.Renderer.Fonts[label.Font].Measure(hotkeyLabel).X; widget.Bounds.Width = panelWidth; } } -} - +} \ No newline at end of file diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index 12f6995fa0..75f77f6f2c 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -24,6 +24,17 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic Widget ingameRoot; World world; + static void BindOrderButton(World world, Widget parent, string button, string icon) + where T : IOrderGenerator, new() + { + var w = parent.Get(button); + w.OnClick = () => world.ToggleInputMode(); + w.IsHighlighted = () => world.OrderGenerator is T; + + w.Get("ICON").GetImageName = + () => world.OrderGenerator is T ? icon + "-active" : icon; + } + void AddChatLine(Color c, string from, string text) { ingameRoot.Get("CHAT_DISPLAY").AddLine(c, from, text); @@ -114,7 +125,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic .Any(a => a.Actor.Owner == world.LocalPlayer && a.Trait.IsActive); if (radarEnabled != cachedRadarEnabled) - Sound.PlayNotification(null, "Sounds", (radarEnabled ? "RadarUp" : "RadarDown"), null); + Sound.PlayNotification(null, "Sounds", radarEnabled ? "RadarUp" : "RadarDown", null); cachedRadarEnabled = radarEnabled; // Switch to observer mode after win/loss @@ -152,16 +163,5 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic return Color.LimeGreen; }; } - - static void BindOrderButton(World world, Widget parent, string button, string icon) - where T : IOrderGenerator, new() - { - var w = parent.Get(button); - w.OnClick = () => world.ToggleInputMode(); - w.IsHighlighted = () => world.OrderGenerator is T; - - w.Get("ICON").GetImageName = - () => world.OrderGenerator is T ? icon+"-active" : icon; - } } } diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs index bdb80ccfec..2cd9679375 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs @@ -49,7 +49,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic }); }; - Action doNothing = () => {}; + Action doNothing = () => { }; menu.Get("QUIT_BUTTON").OnClick = () => CncWidgetUtils.PromptConfirmAction("Abort Mission", "Leave this game and return to the menu?", onQuit, doNothing); @@ -92,35 +92,35 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // Menu panels - ordered from lowest to highest priority var panelParent = Game.OpenWindow(world, "INGAME_MENU_PANEL"); - PanelType Panel = PanelType.Objectives; + PanelType panelType = PanelType.Objectives; var visibleButtons = 0; // Debug / Cheats panel var debugButton = panelParent.Get("DEBUG_BUTTON"); - debugButton.OnClick = () => Panel = PanelType.Debug; - debugButton.IsHighlighted = () => Panel == PanelType.Debug; + debugButton.OnClick = () => panelType = PanelType.Debug; + debugButton.IsHighlighted = () => panelType == PanelType.Debug; if (world.LocalPlayer != null && world.LobbyInfo.GlobalSettings.AllowCheats) { - Panel = PanelType.Debug; + panelType = PanelType.Debug; visibleButtons++; - var debugPanel = Game.LoadWidget(world, "CHEATS_PANEL", panelParent, new WidgetArgs(){{"onExit", doNothing}}); - debugPanel.IsVisible = () => Panel == PanelType.Debug; + var debugPanel = Game.LoadWidget(world, "CHEATS_PANEL", panelParent, new WidgetArgs() { { "onExit", doNothing } }); + debugPanel.IsVisible = () => panelType == PanelType.Debug; debugButton.IsVisible = () => visibleButtons > 1; } // Mission objectives var iop = world.WorldActor.TraitsImplementing().FirstOrDefault(); var objectivesButton = panelParent.Get("OBJECTIVES_BUTTON"); - objectivesButton.OnClick = () => Panel = PanelType.Objectives; - objectivesButton.IsHighlighted = () => Panel == PanelType.Objectives; + objectivesButton.OnClick = () => panelType = PanelType.Objectives; + objectivesButton.IsHighlighted = () => panelType == PanelType.Objectives; if (iop != null && iop.ObjectivesPanel != null) { - Panel = PanelType.Objectives; + panelType = PanelType.Objectives; visibleButtons++; var objectivesPanel = Game.LoadWidget(world, iop.ObjectivesPanel, panelParent, new WidgetArgs()); - objectivesPanel.IsVisible = () => Panel == PanelType.Objectives; + objectivesPanel.IsVisible = () => panelType == PanelType.Objectives; objectivesButton.IsVisible = () => visibleButtons > 1; } } diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs index 5a435c8e99..c024894a8c 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs @@ -54,9 +54,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic public static bool IsValidDisk(string diskRoot) { var files = new string[][] { - new [] { diskRoot, "CONQUER.MIX" }, - new [] { diskRoot, "DESERT.MIX" }, - new [] { diskRoot, "INSTALL", "SETUP.Z" }, + new[] { diskRoot, "CONQUER.MIX" }, + new[] { diskRoot, "DESERT.MIX" }, + new[] { diskRoot, "INSTALL", "SETUP.Z" }, }; return files.All(f => File.Exists(f.Aggregate(Path.Combine))); @@ -89,7 +89,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var installTotal = filesToExtract.Count() + filesToExtract.Count(); var onProgress = (Action)(s => Game.RunAfterTick(() => { - progressBar.Percentage = installCounter*100/installTotal; + progressBar.Percentage = installCounter * 100 / installTotal; installCounter++; statusLabel.GetText = () => s; @@ -97,12 +97,12 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var onError = (Action)(s => Game.RunAfterTick(() => { - statusLabel.GetText = () => "Error: "+s; + statusLabel.GetText = () => "Error: " + s; backButton.IsDisabled = () => false; retryButton.IsDisabled = () => false; })); - new Thread( _ => + new Thread(_ => { try { diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallLogic.cs index 4d49ac346e..349f543ebf 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallLogic.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic public class CncInstallLogic { [ObjectCreator.UseCtor] - public CncInstallLogic(Widget widget, Dictionary installData, Action continueLoading) + public CncInstallLogic(Widget widget, Dictionary installData, Action continueLoading) { var panel = widget.Get("INSTALL_PANEL"); var args = new WidgetArgs() @@ -43,8 +43,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic { Ui.OpenWindow("MODS_PANEL", new WidgetArgs() { - { "onExit", () => {} }, - // Close this panel + { "onExit", () => { } }, { "onSwitch", Ui.CloseWindow }, }); }; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs index 4abf3ca97e..6e2ca0d708 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs @@ -16,9 +16,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic { public class CncMenuLogic { - enum MenuType { Main, Multiplayer, Settings, None } + enum MenuType { Main, Multiplayer, Settings, None } - MenuType Menu = MenuType.Main; + MenuType menuType = MenuType.Main; Widget rootMenu; [ObjectCreator.UseCtor] @@ -32,85 +32,85 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // Menu buttons var mainMenu = widget.Get("MAIN_MENU"); - mainMenu.IsVisible = () => Menu == MenuType.Main; + mainMenu.IsVisible = () => menuType == MenuType.Main; mainMenu.Get("SOLO_BUTTON").OnClick = StartSkirmishGame; - mainMenu.Get("MULTIPLAYER_BUTTON").OnClick = () => Menu = MenuType.Multiplayer; + mainMenu.Get("MULTIPLAYER_BUTTON").OnClick = () => menuType = MenuType.Multiplayer; mainMenu.Get("MODS_BUTTON").OnClick = () => { - Menu = MenuType.None; + menuType = MenuType.None; Ui.OpenWindow("MODS_PANEL", new WidgetArgs() { - { "onExit", () => Menu = MenuType.Main }, + { "onExit", () => menuType = MenuType.Main }, { "onSwitch", RemoveShellmapUI } }); }; - mainMenu.Get("SETTINGS_BUTTON").OnClick = () => Menu = MenuType.Settings; + mainMenu.Get("SETTINGS_BUTTON").OnClick = () => menuType = MenuType.Settings; mainMenu.Get("QUIT_BUTTON").OnClick = Game.Exit; // Multiplayer menu var multiplayerMenu = widget.Get("MULTIPLAYER_MENU"); - multiplayerMenu.IsVisible = () => Menu == MenuType.Multiplayer; + multiplayerMenu.IsVisible = () => menuType == MenuType.Multiplayer; - multiplayerMenu.Get("BACK_BUTTON").OnClick = () => Menu = MenuType.Main; + multiplayerMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; multiplayerMenu.Get("JOIN_BUTTON").OnClick = () => OpenGamePanel("SERVERBROWSER_PANEL"); multiplayerMenu.Get("CREATE_BUTTON").OnClick = () => OpenGamePanel("CREATESERVER_PANEL"); multiplayerMenu.Get("DIRECTCONNECT_BUTTON").OnClick = () => OpenGamePanel("DIRECTCONNECT_PANEL"); // Settings menu var settingsMenu = widget.Get("SETTINGS_MENU"); - settingsMenu.IsVisible = () => Menu == MenuType.Settings; + settingsMenu.IsVisible = () => menuType == MenuType.Settings; settingsMenu.Get("REPLAYS_BUTTON").OnClick = () => { - Menu = MenuType.None; + menuType = MenuType.None; Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs() { - { "onExit", () => Menu = MenuType.Settings }, + { "onExit", () => menuType = MenuType.Settings }, { "onStart", RemoveShellmapUI } }); }; settingsMenu.Get("MUSIC_BUTTON").OnClick = () => { - Menu = MenuType.None; + menuType = MenuType.None; Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs() { - { "onExit", () => Menu = MenuType.Settings }, + { "onExit", () => menuType = MenuType.Settings }, }); }; settingsMenu.Get("CREDITS_BUTTON").OnClick = () => { - Menu = MenuType.None; + menuType = MenuType.None; Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs() { - { "onExit", () => Menu = MenuType.Settings }, + { "onExit", () => menuType = MenuType.Settings }, }); }; settingsMenu.Get("SETTINGS_BUTTON").OnClick = () => { - Menu = MenuType.None; + menuType = MenuType.None; Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs() { - { "onExit", () => Menu = MenuType.Settings }, + { "onExit", () => menuType = MenuType.Settings }, }); }; - settingsMenu.Get("BACK_BUTTON").OnClick = () => Menu = MenuType.Main; + settingsMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; rootMenu.Get("RECBLOCK").IsVisible = () => world.FrameNumber / 25 % 2 == 0; } void OpenGamePanel(string id) { - Menu = MenuType.None; + menuType = MenuType.None; Ui.OpenWindow(id, new WidgetArgs() { - { "onExit", () => Menu = MenuType.Multiplayer }, + { "onExit", () => menuType = MenuType.Multiplayer }, { "openLobby", () => OpenLobbyPanel(MenuType.Multiplayer, false) } }); } @@ -122,10 +122,10 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic void OpenLobbyPanel(MenuType menu, bool addBots) { - Menu = MenuType.None; + menuType = MenuType.None; Game.OpenWindow("SERVER_LOBBY", new WidgetArgs() { - { "onExit", () => { Game.Disconnect(); Menu = menu; } }, + { "onExit", () => { Game.Disconnect(); menuType = menu; } }, { "onStart", RemoveShellmapUI }, { "addBots", addBots } }); @@ -138,7 +138,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic ConnectionLogic.Connect(IPAddress.Loopback.ToString(), Game.CreateLocalServer(map), () => OpenLobbyPanel(MenuType.Main, true), - () => { Game.CloseServer(); Menu = MenuType.Main; }); + () => { Game.CloseServer(); menuType = MenuType.Main; }); } } } diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs index 392e15c176..96ba7a49f4 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs @@ -16,9 +16,9 @@ using OpenRA.FileFormats; using OpenRA.FileFormats.Graphics; using OpenRA.GameRules; using OpenRA.Mods.RA; +using OpenRA.Mods.RA.Widgets; using OpenRA.Mods.RA.Widgets.Logic; using OpenRA.Widgets; -using OpenRA.Mods.RA.Widgets; namespace OpenRA.Mods.Cnc.Widgets.Logic { @@ -27,7 +27,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic enum PanelType { General, Input } SoundDevice soundDevice; - PanelType Settings = PanelType.General; + PanelType settingsPanel = PanelType.General; ColorPreviewManagerWidget colorPreview; World world; @@ -39,11 +39,11 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // General pane var generalButton = panel.Get("GENERAL_BUTTON"); - generalButton.OnClick = () => Settings = PanelType.General; - generalButton.IsHighlighted = () => Settings == PanelType.General; + generalButton.OnClick = () => settingsPanel = PanelType.General; + generalButton.IsHighlighted = () => settingsPanel == PanelType.General; var generalPane = panel.Get("GENERAL_CONTROLS"); - generalPane.IsVisible = () => Settings == PanelType.General; + generalPane.IsVisible = () => settingsPanel == PanelType.General; var gameSettings = Game.Settings.Game; var playerSettings = Game.Settings.Player; @@ -102,7 +102,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // Audio var soundSlider = generalPane.Get("SOUND_SLIDER"); - soundSlider.OnChange += x => { soundSettings.SoundVolume = x; Sound.SoundVolume = x;}; + soundSlider.OnChange += x => { soundSettings.SoundVolume = x; Sound.SoundVolume = x; }; soundSlider.Value = soundSettings.SoundVolume; var musicSlider = generalPane.Get("MUSIC_SLIDER"); @@ -122,11 +122,11 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // Input pane var inputPane = panel.Get("INPUT_CONTROLS"); - inputPane.IsVisible = () => Settings == PanelType.Input; + inputPane.IsVisible = () => settingsPanel == PanelType.Input; var inputButton = panel.Get("INPUT_BUTTON"); - inputButton.OnClick = () => Settings = PanelType.Input; - inputButton.IsHighlighted = () => Settings == PanelType.Input; + inputButton.OnClick = () => settingsPanel = PanelType.Input; + inputButton.IsHighlighted = () => settingsPanel == PanelType.Input; var classicMouseCheckbox = inputPane.Get("CLASSICORDERS_CHECKBOX"); classicMouseCheckbox.IsChecked = () => gameSettings.UseClassicMouseStyle; @@ -154,7 +154,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic int x, y; int.TryParse(windowWidth.Text, out x); int.TryParse(windowHeight.Text, out y); - graphicsSettings.WindowedSize = new int2(x,y); + graphicsSettings.WindowedSize = new int2(x, y); soundSettings.Device = soundDevice.Device; soundSettings.Engine = soundDevice.Engine; Game.Settings.Save(); @@ -163,6 +163,28 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic }; } + static bool ShowMouseScrollDropdown(DropDownButtonWidget dropdown, GameSettings s) + { + var options = new Dictionary() + { + { "Disabled", MouseScrollType.Disabled }, + { "Standard", MouseScrollType.Standard }, + { "Inverted", MouseScrollType.Inverted }, + }; + + Func setupItem = (o, itemTemplate) => + { + var item = ScrollItemWidget.Setup(itemTemplate, + () => s.MouseScroll == options[o], + () => s.MouseScroll = options[o]); + item.Get("LABEL").GetText = () => o; + return item; + }; + + dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 500, options.Keys, setupItem); + return true; + } + bool ShowColorPicker(DropDownButtonWidget color, PlayerSettings s) { Action onChange = c => colorPreview.Color = c; @@ -183,28 +205,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic return true; } - static bool ShowMouseScrollDropdown(DropDownButtonWidget dropdown, GameSettings s) - { - var options = new Dictionary() - { - { "Disabled", MouseScrollType.Disabled }, - { "Standard", MouseScrollType.Standard }, - { "Inverted", MouseScrollType.Inverted }, - }; - - Func setupItem = (o, itemTemplate) => - { - var item = ScrollItemWidget.Setup(itemTemplate, - () => s.MouseScroll == options[o], - () => s.MouseScroll = options[o]); - item.Get("LABEL").GetText = () => o; - return item; - }; - - dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 500, options.Keys, setupItem); - return true; - } - bool ShowAudioDeviceDropdown(DropDownButtonWidget dropdown, SoundSettings s, SoundDevice[] devices) { var i = 0; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTabsLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTabsLogic.cs index aeb8f48df0..c8165241ee 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTabsLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTabsLogic.cs @@ -10,8 +10,8 @@ using System; using System.Drawing; -using OpenRA.Mods.RA.Orders; using OpenRA.Mods.RA.Buildings; +using OpenRA.Mods.RA.Orders; using OpenRA.Traits; using OpenRA.Widgets; @@ -42,8 +42,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var chromeName = button.ProductionGroup.ToLowerInvariant(); var icon = button.Get("ICON"); - icon.GetImageName = () => button.IsDisabled() ? chromeName+"-disabled" : - tabs.Groups[button.ProductionGroup].Alert ? chromeName+"-alert" : chromeName; + icon.GetImageName = () => button.IsDisabled() ? chromeName + "-disabled" : + tabs.Groups[button.ProductionGroup].Alert ? chromeName + "-alert" : chromeName; } [ObjectCreator.UseCtor] diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs index 3c1a22b236..632f7eb0b9 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs @@ -23,8 +23,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic [ObjectCreator.UseCtor] public ProductionTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, ProductionPaletteWidget palette) { - var pm = palette.world.LocalPlayer.PlayerActor.Trait(); - var pr = palette.world.LocalPlayer.PlayerActor.Trait(); + var pm = palette.World.LocalPlayer.PlayerActor.Trait(); + var pr = palette.World.LocalPlayer.PlayerActor.Trait(); widget.IsVisible = () => palette.TooltipActor != null; var nameLabel = widget.Get("NAME"); @@ -75,20 +75,20 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var descString = tooltip.Description.Replace("\\n", "\n"); descLabel.GetText = () => descString; - var leftWidth = new [] {font.Measure(tooltip.Name).X, requiresFont.Measure(requiresString).X, descFont.Measure(descString).X}.Aggregate(Math.Max); - var rightWidth = new [] {font.Measure(powerString).X, font.Measure(timeString).X, font.Measure(costString).X}.Aggregate(Math.Max); - timeLabel.Bounds.X = powerLabel.Bounds.X = costLabel.Bounds.X = leftWidth + 2*nameLabel.Bounds.X; - widget.Bounds.Width = leftWidth + rightWidth + 3*nameLabel.Bounds.X; + var leftWidth = new[] { font.Measure(tooltip.Name).X, requiresFont.Measure(requiresString).X, descFont.Measure(descString).X }.Aggregate(Math.Max); + var rightWidth = new[] { font.Measure(powerString).X, font.Measure(timeString).X, font.Measure(costString).X }.Aggregate(Math.Max); + timeLabel.Bounds.X = powerLabel.Bounds.X = costLabel.Bounds.X = leftWidth + 2 * nameLabel.Bounds.X; + widget.Bounds.Width = leftWidth + rightWidth + 3 * nameLabel.Bounds.X; var leftHeight = font.Measure(tooltip.Name).Y + requiresFont.Measure(requiresString).Y + descFont.Measure(descString).Y; var rightHeight = font.Measure(powerString).Y + font.Measure(timeString).Y + font.Measure(costString).Y; - widget.Bounds.Height = Math.Max(leftHeight, rightHeight)*3/2 + 3*nameLabel.Bounds.Y; + widget.Bounds.Height = Math.Max(leftHeight, rightHeight) * 3 / 2 + 3 * nameLabel.Bounds.Y; lastActor = actor; }; } - static string ActorName( string a ) + static string ActorName(string a) { ActorInfo ai; Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai); @@ -98,5 +98,4 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic return a; } } -} - +} \ No newline at end of file diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/SupportPowerTooltipLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/SupportPowerTooltipLogic.cs index 85060a45a3..0d1bb46690 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/SupportPowerTooltipLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/SupportPowerTooltipLogic.cs @@ -43,7 +43,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic return; // no instances actually exist (race with destroy) time = "{0} / {1}".F(WidgetUtils.FormatTime(sp.RemainingTime), - WidgetUtils.FormatTime(sp.Info.ChargeTime*25)); + WidgetUtils.FormatTime(sp.Info.ChargeTime * 25)); if (sp == lastPower) return; @@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var timeWidth = timeFont.Measure(time).X; var topWidth = nameFont.Measure(name).X + timeWidth + timeOffset; var descSize = descFont.Measure(desc); - widget.Bounds.Width = 2*nameLabel.Bounds.X + Math.Max(topWidth, descSize.X); + widget.Bounds.Width = 2 * nameLabel.Bounds.X + Math.Max(topWidth, descSize.X); widget.Bounds.Height = baseHeight + descSize.Y; timeLabel.Bounds.X = widget.Bounds.Width - nameLabel.Bounds.X - timeWidth; lastPower = sp; @@ -64,5 +64,4 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic descLabel.GetText = () => desc; } } -} - +} \ No newline at end of file diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs index b77c41159e..b172f81fc9 100755 --- a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs @@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.Widgets public readonly string HoldText = ""; public string TooltipActor { get; private set; } - public readonly World world; + public readonly World World; Lazy tooltipContainer; ProductionQueue currentQueue; @@ -52,7 +52,7 @@ namespace OpenRA.Mods.Cnc.Widgets } public override Rectangle EventBounds { get { return eventBounds; } } - Dictionary Icons = new Dictionary(); + Dictionary icons = new Dictionary(); Dictionary iconSprites; Animation cantBuild, clock; Rectangle eventBounds = Rectangle.Empty; @@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Widgets [ObjectCreator.UseCtor] public ProductionPaletteWidget(World world, WorldRenderer worldRenderer) { - this.world = world; + this.World = world; this.worldRenderer = worldRenderer; tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer)); @@ -93,7 +93,7 @@ namespace OpenRA.Mods.Cnc.Widgets { if (TooltipContainer != null) tooltipContainer.Value.SetTooltip(TooltipTemplate, - new WidgetArgs() {{ "palette", this }}); + new WidgetArgs() { { "palette", this } }); } public override void MouseExited() @@ -104,7 +104,7 @@ namespace OpenRA.Mods.Cnc.Widgets public override bool HandleMouseInput(MouseInput mi) { - var icon = Icons.Where(i => i.Key.Contains(mi.Location)) + var icon = icons.Where(i => i.Key.Contains(mi.Location)) .Select(i => i.Value).FirstOrDefault(); if (mi.Event == MouseInputEvent.Move) @@ -126,29 +126,28 @@ namespace OpenRA.Mods.Cnc.Widgets if (first != null && first.Done && actor.Traits.Contains()) { Sound.Play(TabClick); - world.OrderGenerator = new PlaceBuildingOrderGenerator(CurrentQueue.self, icon.Name); + World.OrderGenerator = new PlaceBuildingOrderGenerator(CurrentQueue.self, icon.Name); } - // Resume a paused item else if (first != null && first.Paused) { + // Resume a paused item Sound.Play(TabClick); - world.IssueOrder(Order.PauseProduction(CurrentQueue.self, icon.Name, false)); + World.IssueOrder(Order.PauseProduction(CurrentQueue.self, icon.Name, false)); } - // Queue a new item else if (CurrentQueue.BuildableItems().Any(a => a.Name == icon.Name)) { + // Queue a new item Sound.Play(TabClick); - Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.QueuedAudio, world.LocalPlayer.Country.Race); - world.IssueOrder(Order.StartProduction(CurrentQueue.self, icon.Name, + Sound.PlayNotification(World.LocalPlayer, "Speech", CurrentQueue.Info.QueuedAudio, World.LocalPlayer.Country.Race); + World.IssueOrder(Order.StartProduction(CurrentQueue.self, icon.Name, Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1)); } else Sound.Play(DisabledTabClick); } - - // Hold/Cancel an existing item else if (mi.Button == MouseButton.Right) { + // Hold/Cancel an existing item if (first != null) { Sound.Play(TabClick); @@ -156,25 +155,26 @@ namespace OpenRA.Mods.Cnc.Widgets // instant cancel of things we havent started yet and things that are finished if (first.Paused || first.Done || first.TotalCost == first.RemainingCost) { - Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, world.LocalPlayer.Country.Race); - world.IssueOrder(Order.CancelProduction(CurrentQueue.self, icon.Name, + Sound.PlayNotification(World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Country.Race); + World.IssueOrder(Order.CancelProduction(CurrentQueue.self, icon.Name, Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1)); } else { - Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.OnHoldAudio, world.LocalPlayer.Country.Race); - world.IssueOrder(Order.PauseProduction(CurrentQueue.self, icon.Name, true)); + Sound.PlayNotification(World.LocalPlayer, "Speech", CurrentQueue.Info.OnHoldAudio, World.LocalPlayer.Country.Race); + World.IssueOrder(Order.PauseProduction(CurrentQueue.self, icon.Name, true)); } } else Sound.Play(DisabledTabClick); } + return true; } public void RefreshIcons() { - Icons = new Dictionary(); + icons = new Dictionary(); if (CurrentQueue == null) return; @@ -185,7 +185,7 @@ namespace OpenRA.Mods.Cnc.Widgets { var x = i % Columns; var y = i / Columns; - var rect = new Rectangle(rb.X + x * 64 + 1, rb.Y + y * 48 + 1, 64, 48); + var rect = new Rectangle(rb.X + x * 64 + 1, rb.Y + y * 48 + 1, 64, 48); var pi = new ProductionIcon() { Name = item.Name, @@ -193,20 +193,20 @@ namespace OpenRA.Mods.Cnc.Widgets Pos = new float2(rect.Location), Queued = CurrentQueue.AllQueued().Where(a => a.Item == item.Name).ToList(), }; - Icons.Add(rect, pi); + icons.Add(rect, pi); i++; } - eventBounds = Icons.Keys.Aggregate(Rectangle.Union); + eventBounds = icons.Keys.Aggregate(Rectangle.Union); } public override void Draw() { overlayFont = Game.Renderer.Fonts["TinyBold"]; - timeOffset = new float2(32,24) - overlayFont.Measure(WidgetUtils.FormatTime(0)) / 2; - queuedOffset = new float2(4,2); - holdOffset = new float2(32,24) - overlayFont.Measure(HoldText) / 2; - readyOffset = new float2(32,24) - overlayFont.Measure(ReadyText) / 2; + timeOffset = new float2(32, 24) - overlayFont.Measure(WidgetUtils.FormatTime(0)) / 2; + queuedOffset = new float2(4, 2); + holdOffset = new float2(32, 24) - overlayFont.Measure(HoldText) / 2; + readyOffset = new float2(32, 24) - overlayFont.Measure(ReadyText) / 2; if (CurrentQueue == null) return; @@ -214,11 +214,11 @@ namespace OpenRA.Mods.Cnc.Widgets var buildableItems = CurrentQueue.BuildableItems().OrderBy(a => a.Traits.Get().BuildPaletteOrder); // Background - foreach (var rect in Icons.Keys) - WidgetUtils.DrawPanel("panel-black", rect.InflateBy(1,1,1,1)); + foreach (var rect in icons.Keys) + WidgetUtils.DrawPanel("panel-black", rect.InflateBy(1, 1, 1, 1)); // Icons - foreach (var icon in Icons.Values) + foreach (var icon in icons.Values) { WidgetUtils.DrawSHP(icon.Sprite, icon.Pos, worldRenderer); @@ -237,7 +237,7 @@ namespace OpenRA.Mods.Cnc.Widgets } // Overlays - foreach (var icon in Icons.Values) + foreach (var icon in icons.Values) { var total = icon.Queued.Count; if (total > 0) @@ -267,7 +267,7 @@ namespace OpenRA.Mods.Cnc.Widgets public override string GetCursor(int2 pos) { - var icon = Icons.Where(i => i.Key.Contains(pos)) + var icon = icons.Where(i => i.Key.Contains(pos)) .Select(i => i.Value).FirstOrDefault(); return icon != null ? base.GetCursor(pos) : null; diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs index b618409176..41c5be3040 100755 --- a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs @@ -68,8 +68,8 @@ namespace OpenRA.Mods.Cnc.Widgets public readonly int ArrowWidth = 20; public Dictionary Groups; - int ContentWidth = 0; - float ListOffset = 0; + int contentWidth = 0; + float listOffset = 0; bool leftPressed = false; bool rightPressed = false; Rectangle leftButtonRect; @@ -107,10 +107,14 @@ namespace OpenRA.Mods.Cnc.Widgets public string QueueGroup { - get { return queueGroup; } + get + { + return queueGroup; + } + set { - ListOffset = 0; + listOffset = 0; queueGroup = value; SelectNextTab(false); } @@ -118,7 +122,11 @@ namespace OpenRA.Mods.Cnc.Widgets public ProductionQueue CurrentQueue { - get { return paletteWidget.Value.CurrentQueue; } + get + { + return paletteWidget.Value.CurrentQueue; + } + set { paletteWidget.Value.CurrentQueue = value; @@ -134,9 +142,9 @@ namespace OpenRA.Mods.Cnc.Widgets leftButtonRect = new Rectangle(rb.X, rb.Y, ArrowWidth, rb.Height); rightButtonRect = new Rectangle(rb.Right - ArrowWidth, rb.Y, ArrowWidth, rb.Height); - var leftDisabled = ListOffset >= 0; + var leftDisabled = listOffset >= 0; var leftHover = Ui.MouseOverWidget == this && leftButtonRect.Contains(Viewport.LastMousePos); - var rightDisabled = ListOffset <= Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - ContentWidth; + var rightDisabled = listOffset <= Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - contentWidth; var rightHover = Ui.MouseOverWidget == this && rightButtonRect.Contains(Viewport.LastMousePos); WidgetUtils.DrawPanel("panel-black", rb); @@ -150,20 +158,20 @@ namespace OpenRA.Mods.Cnc.Widgets // Draw tab buttons Game.Renderer.EnableScissor(leftButtonRect.Right, rb.Y + 1, rightButtonRect.Left - leftButtonRect.Right - 1, rb.Height); - var origin = new int2(leftButtonRect.Right - 1 + (int)ListOffset, leftButtonRect.Y); + var origin = new int2(leftButtonRect.Right - 1 + (int)listOffset, leftButtonRect.Y); SpriteFont font = Game.Renderer.Fonts["TinyBold"]; - ContentWidth = 0; + contentWidth = 0; foreach (var tab in Groups[queueGroup].Tabs) { - var rect = new Rectangle(origin.X + ContentWidth, origin.Y, TabWidth, rb.Height); + var rect = new Rectangle(origin.X + contentWidth, origin.Y, TabWidth, rb.Height); var hover = !leftHover && !rightHover && Ui.MouseOverWidget == this && rect.Contains(Viewport.LastMousePos); var baseName = tab.Queue == CurrentQueue ? "button-highlighted" : "button"; ButtonWidget.DrawBackground(baseName, rect, false, false, hover, false); - ContentWidth += TabWidth - 1; + contentWidth += TabWidth - 1; int2 textSize = font.Measure(tab.Name); - int2 position = new int2(rect.X + (rect.Width - textSize.X)/2, rect.Y + (rect.Height - textSize.Y)/2); + int2 position = new int2(rect.X + (rect.Width - textSize.X) / 2, rect.Y + (rect.Height - textSize.Y) / 2); font.DrawTextWithContrast(tab.Name, position, tab.Queue.CurrentDone ? Color.Gold : Color.White, Color.Black, 1); } @@ -172,8 +180,8 @@ namespace OpenRA.Mods.Cnc.Widgets void Scroll(int direction) { - ListOffset += direction*ScrollVelocity; - ListOffset = Math.Min(0,Math.Max(Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - ContentWidth, ListOffset)); + listOffset += direction * ScrollVelocity; + listOffset = Math.Min(0, Math.Max(Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - contentWidth, listOffset)); } // Is added to world.ActorAdded by the SidebarLogic handler @@ -242,8 +250,8 @@ namespace OpenRA.Mods.Cnc.Widgets leftPressed = leftButtonRect.Contains(mi.Location); rightPressed = rightButtonRect.Contains(mi.Location); - var leftDisabled = ListOffset >= 0; - var rightDisabled = ListOffset <= Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - ContentWidth; + var leftDisabled = listOffset >= 0; + var rightDisabled = listOffset <= Bounds.Width - rightButtonRect.Width - leftButtonRect.Width - contentWidth; if (leftPressed || rightPressed) { @@ -254,10 +262,10 @@ namespace OpenRA.Mods.Cnc.Widgets } // Check production tabs - var offsetloc = mi.Location - new int2(leftButtonRect.Right - 1 + (int)ListOffset, leftButtonRect.Y); - if (offsetloc.X > 0 && offsetloc.X < ContentWidth) + var offsetloc = mi.Location - new int2(leftButtonRect.Right - 1 + (int)listOffset, leftButtonRect.Y); + if (offsetloc.X > 0 && offsetloc.X < contentWidth) { - CurrentQueue = Groups[queueGroup].Tabs[offsetloc.X/(TabWidth - 1)].Queue; + CurrentQueue = Groups[queueGroup].Tabs[offsetloc.X / (TabWidth - 1)].Queue; Sound.PlayNotification(null, "Sounds", "ClickSound", null); } diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTypeButtonWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTypeButtonWidget.cs index f7643ba15b..6cb77cfeee 100644 --- a/OpenRA.Mods.Cnc/Widgets/ProductionTypeButtonWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionTypeButtonWidget.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc.Widgets { public readonly string ProductionGroup; - public ProductionTypeButtonWidget() : base() {} + public ProductionTypeButtonWidget() : base() { } protected ProductionTypeButtonWidget(ProductionTypeButtonWidget other) : base(other) { diff --git a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs index 3f6b20a2a4..f6532a83cc 100755 --- a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs @@ -14,31 +14,33 @@ using System.Drawing; using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Widgets; using OpenRA.Mods.RA; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { public class SupportPowersWidget : Widget { - public int Spacing = 10; - public readonly string ReadyText = ""; public readonly string HoldText = ""; - Dictionary iconSprites; - Animation clock; - Dictionary Icons = new Dictionary(); - public readonly string TooltipContainer; public readonly string TooltipTemplate = "SUPPORT_POWER_TOOLTIP"; + + public int Spacing = 10; + + readonly WorldRenderer worldRenderer; + readonly SupportPowerManager spm; + + Dictionary iconSprites; + Animation clock; + Dictionary icons = new Dictionary(); + public SupportPowerInstance TooltipPower { get; private set; } Lazy tooltipContainer; Rectangle eventBounds; public override Rectangle EventBounds { get { return eventBounds; } } - readonly WorldRenderer worldRenderer; - readonly SupportPowerManager spm; SpriteFont overlayFont; float2 holdOffset, readyOffset, timeOffset; @@ -50,7 +52,7 @@ namespace OpenRA.Mods.Cnc.Widgets tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer)); - iconSprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface() ) + iconSprites = Rules.Info.Values.SelectMany(u => u.Traits.WithInterface()) .Select(u => u.Image).Distinct() .ToDictionary( u => u, @@ -68,7 +70,7 @@ namespace OpenRA.Mods.Cnc.Widgets public void RefreshIcons() { - Icons = new Dictionary(); + icons = new Dictionary(); var powers = spm.Powers.Values.Where(p => !p.Disabled); var i = 0; @@ -83,26 +85,26 @@ namespace OpenRA.Mods.Cnc.Widgets Sprite = iconSprites[p.Info.Image] }; - Icons.Add(rect, power); + icons.Add(rect, power); i++; } - eventBounds = (Icons.Count == 0) ? Rectangle.Empty : Icons.Keys.Aggregate(Rectangle.Union); + eventBounds = (icons.Count == 0) ? Rectangle.Empty : icons.Keys.Aggregate(Rectangle.Union); } public override void Draw() { overlayFont = Game.Renderer.Fonts["TinyBold"]; - holdOffset = new float2(32,24) - overlayFont.Measure(HoldText) / 2; - readyOffset = new float2(32,24) - overlayFont.Measure(ReadyText) / 2; - timeOffset = new float2(32,24) - overlayFont.Measure(WidgetUtils.FormatTime(0)) / 2; + holdOffset = new float2(32, 24) - overlayFont.Measure(HoldText) / 2; + readyOffset = new float2(32, 24) - overlayFont.Measure(ReadyText) / 2; + timeOffset = new float2(32, 24) - overlayFont.Measure(WidgetUtils.FormatTime(0)) / 2; // Background - foreach (var rect in Icons.Keys) - WidgetUtils.DrawPanel("panel-black", rect.InflateBy(1,1,1,1)); + foreach (var rect in icons.Keys) + WidgetUtils.DrawPanel("panel-black", rect.InflateBy(1, 1, 1, 1)); // Icons - foreach (var p in Icons.Values) + foreach (var p in icons.Values) { WidgetUtils.DrawSHP(p.Sprite, p.Pos, worldRenderer); @@ -115,7 +117,7 @@ namespace OpenRA.Mods.Cnc.Widgets } // Overlay - foreach (var p in Icons.Values) + foreach (var p in icons.Values) { if (p.Power.Ready) overlayFont.DrawTextWithContrast(ReadyText, @@ -142,7 +144,7 @@ namespace OpenRA.Mods.Cnc.Widgets { if (TooltipContainer == null) return; tooltipContainer.Value.SetTooltip(TooltipTemplate, - new WidgetArgs() {{ "palette", this }}); + new WidgetArgs() { { "palette", this } }); } public override void MouseExited() @@ -155,7 +157,7 @@ namespace OpenRA.Mods.Cnc.Widgets { if (mi.Event == MouseInputEvent.Move) { - var icon = Icons.Where(i => i.Key.Contains(mi.Location)) + var icon = icons.Where(i => i.Key.Contains(mi.Location)) .Select(i => i.Value).FirstOrDefault(); TooltipPower = (icon != null) ? icon.Power : null; return false; @@ -164,7 +166,7 @@ namespace OpenRA.Mods.Cnc.Widgets if (mi.Event != MouseInputEvent.Down) return false; - var clicked = Icons.Where(i => i.Key.Contains(mi.Location)) + var clicked = icons.Where(i => i.Key.Contains(mi.Location)) .Select(i => i.Value).FirstOrDefault(); if (clicked != null) diff --git a/OpenRA.Mods.Cnc/WithCargo.cs b/OpenRA.Mods.Cnc/WithCargo.cs index 2379fd057b..7151f4a61f 100644 --- a/OpenRA.Mods.Cnc/WithCargo.cs +++ b/OpenRA.Mods.Cnc/WithCargo.cs @@ -21,8 +21,8 @@ namespace OpenRA.Mods.Cnc public class WithCargoInfo : ITraitInfo, Requires, Requires { [Desc("Cargo position relative to turret or body. (forward, right, up) triples")] - public readonly WRange[] LocalOffset = {}; - public readonly string[] DisplayTypes = {}; + public readonly WRange[] LocalOffset = { }; + public readonly string[] DisplayTypes = { }; public object Create(ActorInitializer init) { return new WithCargo(init.self, this); } } @@ -31,7 +31,7 @@ namespace OpenRA.Mods.Cnc { Cargo cargo; IFacing facing; - WithCargoInfo Info; + WithCargoInfo cargoInfo; WVec[] positions; IBodyOrientation body; @@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc { cargo = self.Trait(); facing = self.TraitOrDefault(); - Info = info; + cargoInfo = info; body = self.Trait(); @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc positions = new WVec[info.LocalOffset.Length / 3]; for (var i = 0; i < info.LocalOffset.Length / 3; i++) - positions[i] = new WVec(info.LocalOffset[3*i], info.LocalOffset[3*i + 1], info.LocalOffset[3*i + 2]); + positions[i] = new WVec(info.LocalOffset[3 * i], info.LocalOffset[3 * i + 1], info.LocalOffset[3 * i + 2]); } public IEnumerable ModifyRender(Actor self, WorldRenderer wr, IEnumerable r) @@ -66,7 +66,7 @@ namespace OpenRA.Mods.Cnc cargoFacing.Facing = facing.Facing; var cargoPassenger = c.Trait(); - if (Info.DisplayTypes.Contains(cargoPassenger.info.CargoType)) + if (cargoInfo.DisplayTypes.Contains(cargoPassenger.info.CargoType)) { var offset = pos - c.CenterPosition + body.LocalToWorld(positions[i++ % positions.Length].Rotate(bodyOrientation)); foreach (var cr in c.Render(wr)) From 59b700fcdea0ebcfa7534ddb796b1b7227c2bec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 7 Aug 2013 14:16:09 +0200 Subject: [PATCH 10/23] StyleCop clean renderer DLLs --- OpenRA.Renderer.Null/NullGraphicsDevice.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Renderer.Null/NullGraphicsDevice.cs b/OpenRA.Renderer.Null/NullGraphicsDevice.cs index dfa36f21aa..e136c77734 100644 --- a/OpenRA.Renderer.Null/NullGraphicsDevice.cs +++ b/OpenRA.Renderer.Null/NullGraphicsDevice.cs @@ -21,7 +21,7 @@ namespace OpenRA.Renderer.Null { public IGraphicsDevice Create(Size size, WindowMode windowMode) { - return new NullGraphicsDevice( size, windowMode ); + return new NullGraphicsDevice(size, windowMode); } } @@ -54,7 +54,7 @@ namespace OpenRA.Renderer.Null } public void DrawPrimitives(PrimitiveType pt, int firstVertex, int numVertices) { } - public void SetLineWidth( float width ) { } + public void SetLineWidth(float width) { } public IVertexBuffer CreateVertexBuffer(int size) { return new NullVertexBuffer(); } public ITexture CreateTexture() { return new NullTexture(); } From 4603f0bbf648b297875b67e8e505807d2db5918a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 3 Aug 2013 19:30:36 +0200 Subject: [PATCH 11/23] StyleCop clean TilesetBuilder adapt Makefile after TilesetBuilder file renamings remove dead TilesetBuilder code --- Makefile | 12 +- ...er.Designer.cs => FormBuilder.Designer.cs} | 731 +++++++++--------- .../{frmBuilder.cs => FormBuilder.cs} | 134 ++-- .../{frmBuilder.resx => FormBuilder.resx} | 0 ...frmNew.Designer.cs => FormNew.Designer.cs} | 455 +++++------ .../{frmNew.cs => FormNew.cs} | 17 +- .../OpenRA.TilesetBuilder.csproj | 33 +- OpenRA.TilesetBuilder/Program.cs | 8 +- OpenRA.TilesetBuilder/Surface.cs | 42 +- 9 files changed, 704 insertions(+), 728 deletions(-) rename OpenRA.TilesetBuilder/{frmBuilder.Designer.cs => FormBuilder.Designer.cs} (85%) rename OpenRA.TilesetBuilder/{frmBuilder.cs => FormBuilder.cs} (79%) rename OpenRA.TilesetBuilder/{frmBuilder.resx => FormBuilder.resx} (100%) rename OpenRA.TilesetBuilder/{frmNew.Designer.cs => FormNew.Designer.cs} (91%) rename OpenRA.TilesetBuilder/{frmNew.cs => FormNew.cs} (78%) diff --git a/Makefile b/Makefile index 2cdf2b4f75..fa126ef088 100644 --- a/Makefile +++ b/Makefile @@ -194,15 +194,15 @@ tsbuild_TARGET = OpenRA.TilesetBuilder.exe tsbuild_KIND = winexe tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET) tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll -tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.frmBuilder.resources -resource:OpenRA.TilesetBuilder.frmNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources +tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources PROGRAMS += tsbuild -OpenRA.TilesetBuilder.frmBuilder.resources: - resgen2 OpenRA.TilesetBuilder/frmBuilder.resx OpenRA.TilesetBuilder.frmBuilder.resources 1> /dev/null -OpenRA.TilesetBuilder.frmNew.resources: - resgen2 OpenRA.TilesetBuilder/frmNew.resx OpenRA.TilesetBuilder.frmNew.resources 1> /dev/null +OpenRA.TilesetBuilder.FormBuilder.resources: + resgen2 OpenRA.TilesetBuilder/FormBuilder.resx OpenRA.TilesetBuilder.FormBuilder.resources 1> /dev/null +OpenRA.TilesetBuilder.FormNew.resources: + resgen2 OpenRA.TilesetBuilder/frmNew.resx OpenRA.TilesetBuilder.FormNew.resources 1> /dev/null OpenRA.TilesetBuilder.Surface.resources: resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null -tsbuild: OpenRA.TilesetBuilder.frmBuilder.resources OpenRA.TilesetBuilder.frmNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET) +tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET) ##### Launchers / Utilities ##### diff --git a/OpenRA.TilesetBuilder/frmBuilder.Designer.cs b/OpenRA.TilesetBuilder/FormBuilder.Designer.cs similarity index 85% rename from OpenRA.TilesetBuilder/frmBuilder.Designer.cs rename to OpenRA.TilesetBuilder/FormBuilder.Designer.cs index e25c52e08e..a1ac41ff56 100644 --- a/OpenRA.TilesetBuilder/frmBuilder.Designer.cs +++ b/OpenRA.TilesetBuilder/FormBuilder.Designer.cs @@ -1,368 +1,367 @@ -namespace OpenRA.TilesetBuilder -{ - partial class frmBuilder - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBuilder)); - this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.panel1 = new System.Windows.Forms.Panel(); - this.imageList = new System.Windows.Forms.ImageList(this.components); - this.tsTerrainTypes = new System.Windows.Forms.ToolStrip(); - this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel(); - this.txtTilesetName = new System.Windows.Forms.ToolStripTextBox(); - this.toolStripLabel5 = new System.Windows.Forms.ToolStripLabel(); - this.txtID = new System.Windows.Forms.ToolStripTextBox(); - this.lblExt = new System.Windows.Forms.ToolStripLabel(); - this.txtExt = new System.Windows.Forms.ToolStripTextBox(); - this.toolStripLabel6 = new System.Windows.Forms.ToolStripLabel(); - this.txtPal = new System.Windows.Forms.ToolStripTextBox(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripButton15 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton14 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton16 = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); - this.surface1 = new OpenRA.TilesetBuilder.Surface(); - this.toolStripContainer1.ContentPanel.SuspendLayout(); - this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); - this.toolStripContainer1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.tsTerrainTypes.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.SuspendLayout(); +namespace OpenRA.TilesetBuilder +{ + partial class FormBuilder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBuilder)); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.panel1 = new System.Windows.Forms.Panel(); + this.ImageList = new System.Windows.Forms.ImageList(this.components); + this.terrainTypes = new System.Windows.Forms.ToolStrip(); + this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel(); + this.txtTilesetName = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripLabel5 = new System.Windows.Forms.ToolStripLabel(); + this.txtID = new System.Windows.Forms.ToolStripTextBox(); + this.lblExt = new System.Windows.Forms.ToolStripLabel(); + this.txtExt = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripLabel6 = new System.Windows.Forms.ToolStripLabel(); + this.txtPal = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripButton15 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton14 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton16 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); + this.surface1 = new OpenRA.TilesetBuilder.Surface(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.terrainTypes.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1); + this.toolStripContainer1.ContentPanel.Controls.Add(this.terrainTypes); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(908, 571); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(908, 596); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + this.toolStripContainer1.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; // - // toolStripContainer1 - // - // - // toolStripContainer1.ContentPanel - // - this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1); - this.toolStripContainer1.ContentPanel.Controls.Add(this.tsTerrainTypes); - this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(908, 571); - this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); - this.toolStripContainer1.Name = "toolStripContainer1"; - this.toolStripContainer1.Size = new System.Drawing.Size(908, 596); - this.toolStripContainer1.TabIndex = 0; - this.toolStripContainer1.Text = "toolStripContainer1"; - // - // toolStripContainer1.TopToolStripPanel - // - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); - this.toolStripContainer1.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.toolStripContainer1.TopToolStripPanel.Click += new System.EventHandler(this.toolStripContainer1_TopToolStripPanel_Click); - // - // panel1 - // - this.panel1.AutoScroll = true; - this.panel1.BackColor = System.Drawing.Color.Black; + // panel1 + // + this.panel1.AutoScroll = true; + this.panel1.BackColor = System.Drawing.Color.Black; this.panel1.Controls.Add(this.surface1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(788, 571); - this.panel1.TabIndex = 3; - // - // imageList - // - this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"))); - this.imageList.TransparentColor = System.Drawing.Color.Transparent; - this.imageList.Images.SetKeyName(0, "clear.png"); - this.imageList.Images.SetKeyName(1, "water.png"); - this.imageList.Images.SetKeyName(2, "road.png"); - this.imageList.Images.SetKeyName(3, "rock.png"); - this.imageList.Images.SetKeyName(4, "river.png"); - this.imageList.Images.SetKeyName(5, "rough.png"); - this.imageList.Images.SetKeyName(6, "wall.png"); - this.imageList.Images.SetKeyName(7, "beach.png"); - this.imageList.Images.SetKeyName(8, "tree.png"); - this.imageList.Images.SetKeyName(9, "tiberium.png"); - // - // tsTerrainTypes - // - this.tsTerrainTypes.AutoSize = false; - this.tsTerrainTypes.Dock = System.Windows.Forms.DockStyle.Right; - this.tsTerrainTypes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel3, - this.toolStripSeparator3, - this.toolStripLabel4, - this.txtTilesetName, - this.toolStripLabel5, - this.txtID, - this.lblExt, - this.txtExt, - this.toolStripLabel6, - this.txtPal, - this.toolStripSeparator5, - this.toolStripLabel2, - this.toolStripSeparator4, - this.toolStripButton1}); - this.tsTerrainTypes.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; - this.tsTerrainTypes.Location = new System.Drawing.Point(788, 0); - this.tsTerrainTypes.Name = "tsTerrainTypes"; - this.tsTerrainTypes.Size = new System.Drawing.Size(120, 571); - this.tsTerrainTypes.TabIndex = 1; - this.tsTerrainTypes.Text = "toolStrip3"; - // - // toolStripLabel3 - // - this.toolStripLabel3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); - this.toolStripLabel3.Name = "toolStripLabel3"; - this.toolStripLabel3.Size = new System.Drawing.Size(118, 13); - this.toolStripLabel3.Text = "Tileset setup"; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(118, 6); - // - // toolStripLabel4 - // - this.toolStripLabel4.Name = "toolStripLabel4"; - this.toolStripLabel4.Size = new System.Drawing.Size(118, 13); - this.toolStripLabel4.Text = "Tileset name:"; - // - // txtTilesetName - // - this.txtTilesetName.MaxLength = 32; - this.txtTilesetName.Name = "txtTilesetName"; - this.txtTilesetName.Size = new System.Drawing.Size(116, 21); - this.txtTilesetName.Text = "Temperat"; - this.txtTilesetName.TextChanged += new System.EventHandler(this.txtTilesetName_TextChanged); - // - // toolStripLabel5 - // - this.toolStripLabel5.Name = "toolStripLabel5"; - this.toolStripLabel5.Size = new System.Drawing.Size(118, 13); - this.toolStripLabel5.Text = "Tileset ID:"; - // - // txtID - // - this.txtID.Name = "txtID"; - this.txtID.ReadOnly = true; - this.txtID.Size = new System.Drawing.Size(116, 21); - this.txtID.Text = "TEMPERAT"; - // - // lblExt - // - this.lblExt.Name = "lblExt"; - this.lblExt.Size = new System.Drawing.Size(118, 13); - this.lblExt.Text = "Extensions:"; - // - // txtExt - // - this.txtExt.Name = "txtExt"; - this.txtExt.ReadOnly = true; - this.txtExt.Size = new System.Drawing.Size(116, 21); - this.txtExt.Text = ".tem,.shp"; - // - // toolStripLabel6 - // - this.toolStripLabel6.Name = "toolStripLabel6"; - this.toolStripLabel6.Size = new System.Drawing.Size(118, 13); - this.toolStripLabel6.Text = "Palette:"; - // - // txtPal - // - this.txtPal.Name = "txtPal"; - this.txtPal.ReadOnly = true; - this.txtPal.Size = new System.Drawing.Size(116, 21); - this.txtPal.Text = "temperat.pal"; - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(118, 6); - // - // toolStripLabel2 - // - this.toolStripLabel2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); - this.toolStripLabel2.Name = "toolStripLabel2"; - this.toolStripLabel2.Size = new System.Drawing.Size(118, 13); - this.toolStripLabel2.Text = "Terrain type"; - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(118, 6); - // - // toolStripButton1 - // - this.toolStripButton1.Checked = true; - this.toolStripButton1.CheckState = System.Windows.Forms.CheckState.Checked; - this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); - this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton1.Name = "toolStripButton1"; - this.toolStripButton1.Size = new System.Drawing.Size(118, 20); - this.toolStripButton1.Text = "Template Tool"; - this.toolStripButton1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.toolStripButton1.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStrip1 - // - this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripButton15, - this.toolStripButton2, - this.toolStripButton14, - this.toolStripButton16, - this.toolStripSeparator1, - this.toolStripButton3}); - this.toolStrip1.Location = new System.Drawing.Point(3, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(275, 25); - this.toolStrip1.TabIndex = 0; - // - // toolStripButton15 - // - this.toolStripButton15.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton15.Image"))); - this.toolStripButton15.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton15.Name = "toolStripButton15"; - this.toolStripButton15.Size = new System.Drawing.Size(48, 22); - this.toolStripButton15.Text = "New"; - this.toolStripButton15.ToolTipText = "Create new tileset"; - this.toolStripButton15.Click += new System.EventHandler(this.toolStripButton15_Click); - // - // toolStripButton2 - // - this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); - this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton2.Name = "toolStripButton2"; - this.toolStripButton2.Size = new System.Drawing.Size(51, 22); - this.toolStripButton2.Text = "Save"; - this.toolStripButton2.ToolTipText = "Save Template definitions to file (*.tsx)"; - this.toolStripButton2.Click += new System.EventHandler(this.SaveClicked); - // - // toolStripButton14 - // - this.toolStripButton14.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); - this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton14.Name = "toolStripButton14"; - this.toolStripButton14.Size = new System.Drawing.Size(59, 22); - this.toolStripButton14.Text = "Export"; - this.toolStripButton14.ToolTipText = "Export defined Templates to files"; - this.toolStripButton14.Click += new System.EventHandler(this.ExportClicked); - // - // toolStripButton16 - // - this.toolStripButton16.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); - this.toolStripButton16.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton16.Name = "toolStripButton16"; - this.toolStripButton16.Size = new System.Drawing.Size(65, 22); - this.toolStripButton16.Text = "Dump"; - this.toolStripButton16.ToolTipText = "Dump Template ID to tile number mapping to console"; - this.toolStripButton16.Click += new System.EventHandler(this.Export2Clicked); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // toolStripButton3 - // - this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); - this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton3.Name = "toolStripButton3"; - this.toolStripButton3.Size = new System.Drawing.Size(70, 22); - this.toolStripButton3.Text = "Overlays"; - this.toolStripButton3.ToolTipText = "Show/hide terrain type overlays"; - this.toolStripButton3.CheckOnClick = true; - this.toolStripButton3.Click += new System.EventHandler(this.ShowOverlaysClicked); - // - // surface1 - // - this.surface1.BackColor = System.Drawing.Color.Black; - this.surface1.ImagesList = this.imageList; - this.surface1.Location = new System.Drawing.Point(0, 0); - this.surface1.Name = "surface1"; - this.surface1.ShowTerrainTypes = this.toolStripButton3.Checked; - this.surface1.Size = new System.Drawing.Size(653, 454); - this.surface1.TabIndex = 2; - this.surface1.Text = "surface1"; - // - // frmBuilder - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(908, 596); - this.Controls.Add(this.toolStripContainer1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "frmBuilder"; - this.Text = "Tileset Builder 2"; - this.toolStripContainer1.ContentPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.PerformLayout(); - this.toolStripContainer1.ResumeLayout(false); - this.toolStripContainer1.PerformLayout(); - this.panel1.ResumeLayout(false); - this.tsTerrainTypes.ResumeLayout(false); - this.tsTerrainTypes.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.ResumeLayout(false); - } - - #endregion - - private System.Windows.Forms.ToolStripContainer toolStripContainer1; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton toolStripButton2; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripButton toolStripButton3; - private System.Windows.Forms.ToolStripButton toolStripButton14; - private System.Windows.Forms.ToolStripButton toolStripButton15; - private System.Windows.Forms.ToolStripButton toolStripButton16; - public System.Windows.Forms.ImageList imageList; - private System.Windows.Forms.ToolStrip tsTerrainTypes; - private System.Windows.Forms.Panel panel1; - private Surface surface1; - private System.Windows.Forms.ToolStripLabel toolStripLabel2; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripButton toolStripButton1; - private System.Windows.Forms.ToolStripLabel toolStripLabel3; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; - private System.Windows.Forms.ToolStripLabel toolStripLabel4; - private System.Windows.Forms.ToolStripTextBox txtTilesetName; - private System.Windows.Forms.ToolStripLabel toolStripLabel5; - private System.Windows.Forms.ToolStripTextBox txtID; - private System.Windows.Forms.ToolStripLabel lblExt; - private System.Windows.Forms.ToolStripTextBox txtExt; - private System.Windows.Forms.ToolStripLabel toolStripLabel6; - private System.Windows.Forms.ToolStripTextBox txtPal; - } -} - + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(788, 571); + this.panel1.TabIndex = 3; + // + // imageList + // + this.ImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"))); + this.ImageList.TransparentColor = System.Drawing.Color.Transparent; + this.ImageList.Images.SetKeyName(0, "clear.png"); + this.ImageList.Images.SetKeyName(1, "water.png"); + this.ImageList.Images.SetKeyName(2, "road.png"); + this.ImageList.Images.SetKeyName(3, "rock.png"); + this.ImageList.Images.SetKeyName(4, "river.png"); + this.ImageList.Images.SetKeyName(5, "rough.png"); + this.ImageList.Images.SetKeyName(6, "wall.png"); + this.ImageList.Images.SetKeyName(7, "beach.png"); + this.ImageList.Images.SetKeyName(8, "tree.png"); + this.ImageList.Images.SetKeyName(9, "tiberium.png"); + // + // tsTerrainTypes + // + this.terrainTypes.AutoSize = false; + this.terrainTypes.Dock = System.Windows.Forms.DockStyle.Right; + this.terrainTypes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel3, + this.toolStripSeparator3, + this.toolStripLabel4, + this.txtTilesetName, + this.toolStripLabel5, + this.txtID, + this.lblExt, + this.txtExt, + this.toolStripLabel6, + this.txtPal, + this.toolStripSeparator5, + this.toolStripLabel2, + this.toolStripSeparator4, + this.toolStripButton1}); + this.terrainTypes.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; + this.terrainTypes.Location = new System.Drawing.Point(788, 0); + this.terrainTypes.Name = "tsTerrainTypes"; + this.terrainTypes.Size = new System.Drawing.Size(120, 571); + this.terrainTypes.TabIndex = 1; + this.terrainTypes.Text = "toolStrip3"; + // + // toolStripLabel3 + // + this.toolStripLabel3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); + this.toolStripLabel3.Name = "toolStripLabel3"; + this.toolStripLabel3.Size = new System.Drawing.Size(118, 13); + this.toolStripLabel3.Text = "Tileset setup"; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(118, 6); + // + // toolStripLabel4 + // + this.toolStripLabel4.Name = "toolStripLabel4"; + this.toolStripLabel4.Size = new System.Drawing.Size(118, 13); + this.toolStripLabel4.Text = "Tileset name:"; + // + // txtTilesetName + // + this.txtTilesetName.MaxLength = 32; + this.txtTilesetName.Name = "txtTilesetName"; + this.txtTilesetName.Size = new System.Drawing.Size(116, 21); + this.txtTilesetName.Text = "Temperat"; + this.txtTilesetName.TextChanged += new System.EventHandler(this.TilesetNameChanged); + // + // toolStripLabel5 + // + this.toolStripLabel5.Name = "toolStripLabel5"; + this.toolStripLabel5.Size = new System.Drawing.Size(118, 13); + this.toolStripLabel5.Text = "Tileset ID:"; + // + // txtID + // + this.txtID.Name = "txtID"; + this.txtID.ReadOnly = true; + this.txtID.Size = new System.Drawing.Size(116, 21); + this.txtID.Text = "TEMPERAT"; + // + // lblExt + // + this.lblExt.Name = "lblExt"; + this.lblExt.Size = new System.Drawing.Size(118, 13); + this.lblExt.Text = "Extensions:"; + // + // txtExt + // + this.txtExt.Name = "txtExt"; + this.txtExt.ReadOnly = true; + this.txtExt.Size = new System.Drawing.Size(116, 21); + this.txtExt.Text = ".tem,.shp"; + // + // toolStripLabel6 + // + this.toolStripLabel6.Name = "toolStripLabel6"; + this.toolStripLabel6.Size = new System.Drawing.Size(118, 13); + this.toolStripLabel6.Text = "Palette:"; + // + // txtPal + // + this.txtPal.Name = "txtPal"; + this.txtPal.ReadOnly = true; + this.txtPal.Size = new System.Drawing.Size(116, 21); + this.txtPal.Text = "temperat.pal"; + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(118, 6); + // + // toolStripLabel2 + // + this.toolStripLabel2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); + this.toolStripLabel2.Name = "toolStripLabel2"; + this.toolStripLabel2.Size = new System.Drawing.Size(118, 13); + this.toolStripLabel2.Text = "Terrain type"; + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(118, 6); + // + // toolStripButton1 + // + this.toolStripButton1.Checked = true; + this.toolStripButton1.CheckState = System.Windows.Forms.CheckState.Checked; + this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(118, 20); + this.toolStripButton1.Text = "Template Tool"; + this.toolStripButton1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.toolStripButton1.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButton15, + this.toolStripButton2, + this.toolStripButton14, + this.toolStripButton16, + this.toolStripSeparator1, + this.toolStripButton3}); + this.toolStrip1.Location = new System.Drawing.Point(3, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(275, 25); + this.toolStrip1.TabIndex = 0; + // + // toolStripButton15 + // + this.toolStripButton15.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton15.Image"))); + this.toolStripButton15.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton15.Name = "toolStripButton15"; + this.toolStripButton15.Size = new System.Drawing.Size(48, 22); + this.toolStripButton15.Text = "New"; + this.toolStripButton15.ToolTipText = "Create new tileset"; + this.toolStripButton15.Click += new System.EventHandler(this.NewTilesetButton); + // + // toolStripButton2 + // + this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(51, 22); + this.toolStripButton2.Text = "Save"; + this.toolStripButton2.ToolTipText = "Save Template definitions to file (*.tsx)"; + this.toolStripButton2.Click += new System.EventHandler(this.SaveClicked); + // + // toolStripButton14 + // + this.toolStripButton14.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); + this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton14.Name = "toolStripButton14"; + this.toolStripButton14.Size = new System.Drawing.Size(59, 22); + this.toolStripButton14.Text = "Export"; + this.toolStripButton14.ToolTipText = "Export defined Templates to files"; + this.toolStripButton14.Click += new System.EventHandler(this.ExportClicked); + // + // toolStripButton16 + // + this.toolStripButton16.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); + this.toolStripButton16.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton16.Name = "toolStripButton16"; + this.toolStripButton16.Size = new System.Drawing.Size(65, 22); + this.toolStripButton16.Text = "Dump"; + this.toolStripButton16.ToolTipText = "Dump Template ID to tile number mapping to console"; + this.toolStripButton16.Click += new System.EventHandler(this.Export2Clicked); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton3 + // + this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); + this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton3.Name = "toolStripButton3"; + this.toolStripButton3.Size = new System.Drawing.Size(70, 22); + this.toolStripButton3.Text = "Overlays"; + this.toolStripButton3.ToolTipText = "Show/hide terrain type overlays"; + this.toolStripButton3.CheckOnClick = true; + this.toolStripButton3.Click += new System.EventHandler(this.ShowOverlaysClicked); + // + // surface1 + // + this.surface1.BackColor = System.Drawing.Color.Black; + this.surface1.ImagesList = this.ImageList; + this.surface1.Location = new System.Drawing.Point(0, 0); + this.surface1.Name = "surface1"; + this.surface1.ShowTerrainTypes = this.toolStripButton3.Checked; + this.surface1.Size = new System.Drawing.Size(653, 454); + this.surface1.TabIndex = 2; + this.surface1.Text = "surface1"; + // + // frmBuilder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(908, 596); + this.Controls.Add(this.toolStripContainer1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "frmBuilder"; + this.Text = "Tileset Builder 2"; + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.terrainTypes.ResumeLayout(false); + this.terrainTypes.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton toolStripButton3; + private System.Windows.Forms.ToolStripButton toolStripButton14; + private System.Windows.Forms.ToolStripButton toolStripButton15; + private System.Windows.Forms.ToolStripButton toolStripButton16; + public System.Windows.Forms.ImageList ImageList; + private System.Windows.Forms.ToolStrip terrainTypes; + private System.Windows.Forms.Panel panel1; + private Surface surface1; + private System.Windows.Forms.ToolStripLabel toolStripLabel2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripLabel toolStripLabel3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.ToolStripLabel toolStripLabel4; + private System.Windows.Forms.ToolStripTextBox txtTilesetName; + private System.Windows.Forms.ToolStripLabel toolStripLabel5; + private System.Windows.Forms.ToolStripTextBox txtID; + private System.Windows.Forms.ToolStripLabel lblExt; + private System.Windows.Forms.ToolStripTextBox txtExt; + private System.Windows.Forms.ToolStripLabel toolStripLabel6; + private System.Windows.Forms.ToolStripTextBox txtPal; + } +} \ No newline at end of file diff --git a/OpenRA.TilesetBuilder/frmBuilder.cs b/OpenRA.TilesetBuilder/FormBuilder.cs similarity index 79% rename from OpenRA.TilesetBuilder/frmBuilder.cs rename to OpenRA.TilesetBuilder/FormBuilder.cs index 2eafa1c68a..f988d3fbde 100644 --- a/OpenRA.TilesetBuilder/frmBuilder.cs +++ b/OpenRA.TilesetBuilder/FormBuilder.cs @@ -14,19 +14,19 @@ using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Windows.Forms; using System.Xml; -using System.Runtime.InteropServices; using OpenRA.FileFormats; namespace OpenRA.TilesetBuilder { - public partial class frmBuilder : Form + public partial class FormBuilder : Form { string srcfile; int size; public TerrainTypeInfo[] TerrainType; - public Palette tpal; + public Palette TerrainPalette; public bool PaletteFromImage = true; public string PaletteFile = ""; public string ImageFile = ""; @@ -40,13 +40,13 @@ namespace OpenRA.TilesetBuilder public void CreateNewTileset() { this.Show(); - using (var fNew = new frmNew { }) - if (DialogResult.OK == fNew.ShowDialog()) + using (var formNew = new FormNew { }) + if (DialogResult.OK == formNew.ShowDialog()) { - PaletteFromImage = fNew.PaletteFromImage; - PaletteFile = fNew.PaletteFile; - ImageFile = fNew.ImageFile; - TileSize = fNew.TileSize; + PaletteFromImage = formNew.PaletteFromImage; + PaletteFile = formNew.PaletteFile; + ImageFile = formNew.ImageFile; + TileSize = formNew.TileSize; srcfile = ImageFile; this.size = TileSize; @@ -56,12 +56,12 @@ namespace OpenRA.TilesetBuilder Bitmap rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height), fbitmap.PixelFormat); - int[] ShadowIndex = { }; + int[] shadowIndex = { }; if (!PaletteFromImage) { - tpal = Palette.Load(PaletteFile, ShadowIndex); - rbitmap.Palette = tpal.AsSystemPalette(); + TerrainPalette = Palette.Load(PaletteFile, shadowIndex); + rbitmap.Palette = TerrainPalette.AsSystemPalette(); } surface1.Image = (Bitmap)rbitmap; @@ -75,18 +75,18 @@ namespace OpenRA.TilesetBuilder } } - public frmBuilder(string src, string tsize, bool AutoExport, string OutputDir) + public FormBuilder(string src, string tsize, bool autoExport, string outputDir) { InitializeComponent(); - Dictionary DefTerrain = new Dictionary(); + Dictionary terrainDefinition = new Dictionary(); int size = int.Parse(tsize); var yaml = MiniYaml.DictFromFile("OpenRA.TilesetBuilder/defaults.yaml"); - DefTerrain = yaml["Terrain"].NodesDict.Values.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type); + terrainDefinition = yaml["Terrain"].NodesDict.Values.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type); int i = 0; - surface1.icon = new Bitmap[DefTerrain.Keys.Count]; - TerrainType = new TerrainTypeInfo[DefTerrain.Keys.Count]; + surface1.Icon = new Bitmap[terrainDefinition.Keys.Count]; + TerrainType = new TerrainTypeInfo[terrainDefinition.Keys.Count]; var title = this.Text; surface1.UpdateMouseTilePosition += (x, y, tileNr) => @@ -95,29 +95,30 @@ namespace OpenRA.TilesetBuilder }; surface1.Enabled = false; - foreach (var deftype in DefTerrain) + foreach (var deftype in terrainDefinition) { - Bitmap icon = new Bitmap(16, 16); - int x, y; + var icon = new Bitmap(16, 16); + // Loop through the images pixels to reset color. - for (x = 0; x < icon.Width; x++) + for (var x = 0; x < icon.Width; x++) { - for (y = 0; y < icon.Height; y++) + for (var y = 0; y < icon.Height; y++) { Color newColor = deftype.Value.Color; icon.SetPixel(x, y, newColor); } } - surface1.icon[i] = icon; + + surface1.Icon[i] = icon; TerrainType[i] = deftype.Value; - ToolStripButton TerrainTypeButton = new ToolStripButton(deftype.Key, icon, TerrainTypeSelectorClicked); - TerrainTypeButton.ToolTipText = deftype.Key; - TerrainTypeButton.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - TerrainTypeButton.Tag = i.ToString(); - TerrainTypeButton.ImageAlign = ContentAlignment.MiddleLeft; + var terrainTypeButton = new ToolStripButton(deftype.Key, icon, TerrainTypeSelectorClicked); + terrainTypeButton.ToolTipText = deftype.Key; + terrainTypeButton.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; + terrainTypeButton.Tag = i.ToString(); + terrainTypeButton.ImageAlign = ContentAlignment.MiddleLeft; i++; - tsTerrainTypes.Items.Add(TerrainTypeButton); + terrainTypes.Items.Add(terrainTypeButton); } if (src.Length > 0) @@ -139,9 +140,9 @@ namespace OpenRA.TilesetBuilder CreateNewTileset(); } - if (AutoExport) + if (autoExport) { - Export(OutputDir); + Export(outputDir); Application.Exit(); } } @@ -173,7 +174,7 @@ namespace OpenRA.TilesetBuilder public void Save() { - using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile,"tsx"), + using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile, "tsx"), new XmlWriterSettings { Indent = true, IndentChars = " " })) { var tilesetName = txtTilesetName.Text; @@ -187,8 +188,8 @@ namespace OpenRA.TilesetBuilder w.WriteAttributeString("value", tilesetName); w.WriteEndElement(); - for( var i = 0; i <= surface1.TerrainTypes.GetUpperBound(0); i++ ) - for( var j = 0; j <= surface1.TerrainTypes.GetUpperBound(1); j++ ) + for (var i = 0; i <= surface1.TerrainTypes.GetUpperBound(0); i++) + for (var j = 0; j <= surface1.TerrainTypes.GetUpperBound(1); j++) if (surface1.TerrainTypes[i, j] != 0) { w.WriteStartElement("terrain"); @@ -254,15 +255,15 @@ namespace OpenRA.TilesetBuilder string ExportTemplate(Template t, int n, string suffix, string dir) { - var TileSize = size; + var tileSize = size; var filename = Path.Combine(dir, "{0}{1:00}{2}".F(txtTilesetName.Text, n, suffix)); var totalTiles = t.Width * t.Height; var ms = new MemoryStream(); using (var bw = new BinaryWriter(ms)) { - bw.Write((ushort)TileSize); - bw.Write((ushort)TileSize); + bw.Write((ushort)tileSize); + bw.Write((ushort)tileSize); bw.Write((uint)totalTiles); bw.Write((ushort)t.Width); bw.Write((ushort)t.Height); @@ -290,16 +291,15 @@ namespace OpenRA.TilesetBuilder { if (t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top))) { - byte* q = p + data.Stride * TileSize * (v + t.Top) + TileSize * (u + t.Left); - for (var j = 0; j < TileSize; j++) - for (var i = 0; i < TileSize; i++) + byte* q = p + data.Stride * tileSize * (v + t.Top) + tileSize * (u + t.Left); + for (var j = 0; j < tileSize; j++) + for (var i = 0; i < tileSize; i++) { bw.Write(q[i + j * data.Stride]); } - } else - for (var x = 0; x < TileSize * TileSize; x++) + for (var x = 0; x < tileSize * tileSize; x++) bw.Write((byte)0); /* TODO: don't fill with air */ } } @@ -317,7 +317,7 @@ namespace OpenRA.TilesetBuilder bw.Flush(); var flagsStart = ms.Position; - for (var x = 0; x < totalTiles; x++ ) + for (var x = 0; x < totalTiles; x++) bw.Write((byte)0); bw.Flush(); @@ -334,12 +334,13 @@ namespace OpenRA.TilesetBuilder File.WriteAllBytes(filename, bytes); } + return filename; } - public void Export (string OutputDir) + public void Export(string outputDir) { - var dir = Path.Combine(Path.GetDirectoryName(srcfile), Platform.SupportDir+OutputDir); + var dir = Path.Combine(Path.GetDirectoryName(srcfile), Platform.SupportDir + outputDir); Directory.CreateDirectory(dir); var tilesetName = txtTilesetName.Text; var tilesetID = txtID.Text; @@ -350,30 +351,24 @@ namespace OpenRA.TilesetBuilder if (tilesetID.Length < 1) { tilesetID = "TEMPERAT"; } if (tilesetPalette.Length < 1) { tilesetPalette = "temperat"; } if (tilesetExt.Length < 1) { tilesetExt = ".tem,.shp"; } + // Create a Tileset definition // TODO: Pull this info from the GUI var tilesetFile = ""; - //var mixFile = ""; tilesetFile = tilesetName.ToLower(); if (tilesetFile.Length < 8) - { tilesetFile = tilesetName.ToLower() + ".yaml"; - //mixFile = tilesetName.ToLower() + ".mix"; - } else - { tilesetFile = tilesetName.ToLower().Substring(0, 8) + ".yaml"; - //mixFile = tilesetName.ToLower().Substring(0, 8) + ".mix"; - } - string[] Ext = tilesetExt.Split(','); + var ext = tilesetExt.Split(','); var tileset = new TileSet() { Name = tilesetName, Id = tilesetID.ToUpper(), TileSize = size, Palette = tilesetPalette.ToLower(), - Extensions = new string[] { Ext[0], Ext[1] } + Extensions = new string[] { ext[0], ext[1] } }; // List of files to add to the mix file @@ -401,14 +396,14 @@ namespace OpenRA.TilesetBuilder { Id = cur, Image = "{0}{1:00}".F(txtTilesetName.Text, cur), - Size = new int2(tp.Width,tp.Height), + Size = new int2(tp.Width, tp.Height), }; foreach (var t in tp.Cells) { string ttype = "Clear"; ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type; - var idx = ((t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top)); + var idx = (t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top); template.Tiles.Add((byte)idx, ttype); } @@ -417,13 +412,6 @@ namespace OpenRA.TilesetBuilder } tileset.Save(Path.Combine(dir, tilesetFile)); - //throw new NotImplementedException("NotI"); - //PackageWriter.CreateMix(Path.Combine(dir, mixFile),fileList); - - // Cleanup - //foreach (var file in fileList) - //File.Delete(file); - Console.WriteLine("Finished export"); } @@ -437,7 +425,7 @@ namespace OpenRA.TilesetBuilder { foreach (var t in tp.Cells) { - var idx = ((t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top)); + var idx = (t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top); // TemplateID CellID tilenr TemplateW TemplateH XinTilesPNG YinTilesPNG Console.WriteLine("{0} {1} {2} {3} {4} {5} {6}", @@ -447,8 +435,7 @@ namespace OpenRA.TilesetBuilder tp.Width, tp.Height, t.Key.X, - t.Key.Y - ); + t.Key.Y); } cur++; @@ -457,23 +444,14 @@ namespace OpenRA.TilesetBuilder Console.WriteLine("# end\n"); } - private void toolStripContainer1_TopToolStripPanel_Click(object sender, EventArgs e) - { - - } - - private void surface1_Click(object sender, EventArgs e) - { - - } - - private void txtTilesetName_TextChanged(object sender, EventArgs e) + private void TilesetNameChanged(object sender, EventArgs e) { var tilesetFile = txtTilesetName.Text; if (tilesetFile.Length > 8) { tilesetFile = tilesetFile.ToLower().Substring(0, 8); } + txtID.Text = tilesetFile.ToUpper(); txtPal.Text = tilesetFile.ToLower() + ".pal"; if (tilesetFile.Length < 3) @@ -486,7 +464,7 @@ namespace OpenRA.TilesetBuilder } } - private void toolStripButton15_Click(object sender, EventArgs e) + private void NewTilesetButton(object sender, EventArgs e) { CreateNewTileset(); } diff --git a/OpenRA.TilesetBuilder/frmBuilder.resx b/OpenRA.TilesetBuilder/FormBuilder.resx similarity index 100% rename from OpenRA.TilesetBuilder/frmBuilder.resx rename to OpenRA.TilesetBuilder/FormBuilder.resx diff --git a/OpenRA.TilesetBuilder/frmNew.Designer.cs b/OpenRA.TilesetBuilder/FormNew.Designer.cs similarity index 91% rename from OpenRA.TilesetBuilder/frmNew.Designer.cs rename to OpenRA.TilesetBuilder/FormNew.Designer.cs index 1acc2ac303..309e1a45c2 100644 --- a/OpenRA.TilesetBuilder/frmNew.Designer.cs +++ b/OpenRA.TilesetBuilder/FormNew.Designer.cs @@ -1,228 +1,229 @@ -namespace OpenRA.TilesetBuilder -{ - partial class frmNew - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.numSize = new System.Windows.Forms.NumericUpDown(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.txtPal = new System.Windows.Forms.TextBox(); - this.btnPalBrowse = new System.Windows.Forms.Button(); - this.chkUsePalFromImage = new System.Windows.Forms.CheckBox(); - this.label3 = new System.Windows.Forms.Label(); - this.imgImage = new System.Windows.Forms.PictureBox(); - this.btnImgBrowse = new System.Windows.Forms.Button(); - this.txtImage = new System.Windows.Forms.TextBox(); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnOk = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.numSize)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.imgImage)).BeginInit(); - this.SuspendLayout(); - // - // numSize - // - this.numSize.Location = new System.Drawing.Point(66, 6); - this.numSize.Maximum = new decimal(new int[] { - 264, - 0, - 0, - 0}); - this.numSize.Minimum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.numSize.Name = "numSize"; - this.numSize.Size = new System.Drawing.Size(49, 20); - this.numSize.TabIndex = 0; - this.numSize.Value = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.numSize.ValueChanged += new System.EventHandler(this.numSize_ValueChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(48, 13); - this.label1.TabIndex = 1; - this.label1.Text = "Tile size:"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(12, 34); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(43, 13); - this.label2.TabIndex = 2; - this.label2.Text = "Palette:"; - // - // txtPal - // - this.txtPal.Location = new System.Drawing.Point(15, 52); - this.txtPal.Name = "txtPal"; - this.txtPal.ReadOnly = true; - this.txtPal.Size = new System.Drawing.Size(267, 20); - this.txtPal.TabIndex = 3; - // - // btnPalBrowse - // - this.btnPalBrowse.Enabled = false; - this.btnPalBrowse.Location = new System.Drawing.Point(288, 50); - this.btnPalBrowse.Name = "btnPalBrowse"; - this.btnPalBrowse.Size = new System.Drawing.Size(26, 23); - this.btnPalBrowse.TabIndex = 4; - this.btnPalBrowse.Text = "..."; - this.btnPalBrowse.UseVisualStyleBackColor = true; - this.btnPalBrowse.Click += new System.EventHandler(this.btnPalBrowse_Click); - // - // chkUsePalFromImage - // - this.chkUsePalFromImage.AutoSize = true; - this.chkUsePalFromImage.Checked = true; - this.chkUsePalFromImage.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkUsePalFromImage.Location = new System.Drawing.Point(66, 34); - this.chkUsePalFromImage.Name = "chkUsePalFromImage"; - this.chkUsePalFromImage.Size = new System.Drawing.Size(134, 17); - this.chkUsePalFromImage.TabIndex = 5; - this.chkUsePalFromImage.Text = "Use palette from image"; - this.chkUsePalFromImage.UseVisualStyleBackColor = true; - this.chkUsePalFromImage.CheckedChanged += new System.EventHandler(this.chkUsePalFromImage_CheckedChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(12, 75); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(39, 13); - this.label3.TabIndex = 6; - this.label3.Text = "Image:"; - // - // imgImage - // - this.imgImage.BackColor = System.Drawing.Color.Black; - this.imgImage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.imgImage.Location = new System.Drawing.Point(15, 120); - this.imgImage.Name = "imgImage"; - this.imgImage.Size = new System.Drawing.Size(299, 219); - this.imgImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.imgImage.TabIndex = 7; - this.imgImage.TabStop = false; - // - // btnImgBrowse - // - this.btnImgBrowse.Location = new System.Drawing.Point(288, 91); - this.btnImgBrowse.Name = "btnImgBrowse"; - this.btnImgBrowse.Size = new System.Drawing.Size(26, 23); - this.btnImgBrowse.TabIndex = 9; - this.btnImgBrowse.Text = "..."; - this.btnImgBrowse.UseVisualStyleBackColor = true; - this.btnImgBrowse.Click += new System.EventHandler(this.btnImgBrowse_Click); - // - // txtImage - // - this.txtImage.Location = new System.Drawing.Point(15, 91); - this.txtImage.Name = "txtImage"; - this.txtImage.ReadOnly = true; - this.txtImage.Size = new System.Drawing.Size(267, 20); - this.txtImage.TabIndex = 8; - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(239, 345); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 10; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOk - // - this.btnOk.Location = new System.Drawing.Point(158, 345); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(75, 23); - this.btnOk.TabIndex = 11; - this.btnOk.Text = "OK"; - this.btnOk.UseVisualStyleBackColor = true; - this.btnOk.Click += new System.EventHandler(this.btnOk_Click); - // - // frmNew - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(329, 378); - this.Controls.Add(this.btnOk); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnImgBrowse); - this.Controls.Add(this.txtImage); - this.Controls.Add(this.imgImage); - this.Controls.Add(this.label3); - this.Controls.Add(this.chkUsePalFromImage); - this.Controls.Add(this.btnPalBrowse); - this.Controls.Add(this.txtPal); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.numSize); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "frmNew"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "New Tileset"; - ((System.ComponentModel.ISupportInitialize)(this.numSize)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.imgImage)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.NumericUpDown numSize; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox txtPal; - private System.Windows.Forms.Button btnPalBrowse; - private System.Windows.Forms.CheckBox chkUsePalFromImage; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.PictureBox imgImage; - private System.Windows.Forms.Button btnImgBrowse; - private System.Windows.Forms.TextBox txtImage; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.Button btnOk; - } +namespace OpenRA.TilesetBuilder +{ + partial class FormNew + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.numSize = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.txtPal = new System.Windows.Forms.TextBox(); + this.btnPalBrowse = new System.Windows.Forms.Button(); + this.chkUsePalFromImage = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.imgImage = new System.Windows.Forms.PictureBox(); + this.btnImgBrowse = new System.Windows.Forms.Button(); + this.txtImage = new System.Windows.Forms.TextBox(); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOk = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.numSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imgImage)).BeginInit(); + this.SuspendLayout(); + // + // numSize + // + this.numSize.Location = new System.Drawing.Point(66, 6); + this.numSize.Maximum = new decimal(new int[] { + 264, + 0, + 0, + 0}); + this.numSize.Minimum = new decimal(new int[] { + 24, + 0, + 0, + 0}); + this.numSize.Name = "numSize"; + this.numSize.Size = new System.Drawing.Size(49, 20); + this.numSize.TabIndex = 0; + this.numSize.Value = new decimal(new int[] { + 24, + 0, + 0, + 0}); + this.numSize.ValueChanged += new System.EventHandler(this.NumSizeValueChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(48, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Tile size:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(43, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Palette:"; + // + // txtPal + // + this.txtPal.Location = new System.Drawing.Point(15, 52); + this.txtPal.Name = "txtPal"; + this.txtPal.ReadOnly = true; + this.txtPal.Size = new System.Drawing.Size(267, 20); + this.txtPal.TabIndex = 3; + // + // btnPalBrowse + // + this.btnPalBrowse.Enabled = false; + this.btnPalBrowse.Location = new System.Drawing.Point(288, 50); + this.btnPalBrowse.Name = "btnPalBrowse"; + this.btnPalBrowse.Size = new System.Drawing.Size(26, 23); + this.btnPalBrowse.TabIndex = 4; + this.btnPalBrowse.Text = "..."; + this.btnPalBrowse.UseVisualStyleBackColor = true; + this.btnPalBrowse.Click += new System.EventHandler(this.PaletteBrowseClick); + // + // chkUsePalFromImage + // + this.chkUsePalFromImage.AutoSize = true; + this.chkUsePalFromImage.Checked = true; + this.chkUsePalFromImage.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkUsePalFromImage.Location = new System.Drawing.Point(66, 34); + this.chkUsePalFromImage.Name = "chkUsePalFromImage"; + this.chkUsePalFromImage.Size = new System.Drawing.Size(134, 17); + this.chkUsePalFromImage.TabIndex = 5; + this.chkUsePalFromImage.Text = "Use palette from image"; + this.chkUsePalFromImage.UseVisualStyleBackColor = true; + this.chkUsePalFromImage.CheckedChanged += new System.EventHandler(this.UsePaletteFromImageCheckedChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 75); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(39, 13); + this.label3.TabIndex = 6; + this.label3.Text = "Image:"; + // + // imgImage + // + this.imgImage.BackColor = System.Drawing.Color.Black; + this.imgImage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.imgImage.Location = new System.Drawing.Point(15, 120); + this.imgImage.Name = "imgImage"; + this.imgImage.Size = new System.Drawing.Size(299, 219); + this.imgImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.imgImage.TabIndex = 7; + this.imgImage.TabStop = false; + // + // btnImgBrowse + // + this.btnImgBrowse.Location = new System.Drawing.Point(288, 91); + this.btnImgBrowse.Name = "btnImgBrowse"; + this.btnImgBrowse.Size = new System.Drawing.Size(26, 23); + this.btnImgBrowse.TabIndex = 9; + this.btnImgBrowse.Text = "..."; + this.btnImgBrowse.UseVisualStyleBackColor = true; + this.btnImgBrowse.Click += new System.EventHandler(this.ImageBrowseClick); + // + // txtImage + // + this.txtImage.Location = new System.Drawing.Point(15, 91); + this.txtImage.Name = "txtImage"; + this.txtImage.ReadOnly = true; + this.txtImage.Size = new System.Drawing.Size(267, 20); + this.txtImage.TabIndex = 8; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(239, 345); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 10; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.CancelButtonClick); + // + // btnOk + // + this.btnOk.Location = new System.Drawing.Point(158, 345); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(75, 23); + this.btnOk.TabIndex = 11; + this.btnOk.Text = "OK"; + this.btnOk.UseVisualStyleBackColor = true; + this.btnOk.Click += new System.EventHandler(this.OkButtonClick); + // + // frmNew + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(329, 378); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnImgBrowse); + this.Controls.Add(this.txtImage); + this.Controls.Add(this.imgImage); + this.Controls.Add(this.label3); + this.Controls.Add(this.chkUsePalFromImage); + this.Controls.Add(this.btnPalBrowse); + this.Controls.Add(this.txtPal); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.numSize); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "frmNew"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "New Tileset"; + ((System.ComponentModel.ISupportInitialize)(this.numSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imgImage)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.NumericUpDown numSize; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtPal; + private System.Windows.Forms.Button btnPalBrowse; + private System.Windows.Forms.CheckBox chkUsePalFromImage; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.PictureBox imgImage; + private System.Windows.Forms.Button btnImgBrowse; + private System.Windows.Forms.TextBox txtImage; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.Button btnOk; + } } \ No newline at end of file diff --git a/OpenRA.TilesetBuilder/frmNew.cs b/OpenRA.TilesetBuilder/FormNew.cs similarity index 78% rename from OpenRA.TilesetBuilder/frmNew.cs rename to OpenRA.TilesetBuilder/FormNew.cs index 6f6444af83..c7e03f8a1d 100644 --- a/OpenRA.TilesetBuilder/frmNew.cs +++ b/OpenRA.TilesetBuilder/FormNew.cs @@ -8,24 +8,24 @@ using System.Windows.Forms; namespace OpenRA.TilesetBuilder { - public partial class frmNew : Form + public partial class FormNew : Form { public bool PaletteFromImage = true; public string PaletteFile = ""; public string ImageFile = ""; public int TileSize = 24; - public frmNew() + public FormNew() { InitializeComponent(); } - private void btnCancel_Click(object sender, EventArgs e) + private void CancelButtonClick(object sender, EventArgs e) { Close(); } - private void btnOk_Click(object sender, EventArgs e) + private void OkButtonClick(object sender, EventArgs e) { if (!PaletteFromImage) { @@ -34,6 +34,7 @@ namespace OpenRA.TilesetBuilder MessageBox.Show("No palette specified", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } + if (ImageFile.Length < 5) { MessageBox.Show("No image selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -45,7 +46,7 @@ namespace OpenRA.TilesetBuilder } } - private void chkUsePalFromImage_CheckedChanged(object sender, EventArgs e) + private void UsePaletteFromImageCheckedChanged(object sender, EventArgs e) { if (chkUsePalFromImage.Checked) { @@ -59,7 +60,7 @@ namespace OpenRA.TilesetBuilder } } - private void btnPalBrowse_Click(object sender, EventArgs e) + private void PaletteBrowseClick(object sender, EventArgs e) { using (var ofd = new OpenFileDialog { Filter = "C&C Palette (*.pal)|*.pal" }) if (DialogResult.OK == ofd.ShowDialog()) @@ -69,7 +70,7 @@ namespace OpenRA.TilesetBuilder } } - private void btnImgBrowse_Click(object sender, EventArgs e) + private void ImageBrowseClick(object sender, EventArgs e) { using (var ofd = new OpenFileDialog { Filter = "8bit Image (*.png,*.pcx,*.bmp)|*.png;*.pcx;*.bmp" }) if (DialogResult.OK == ofd.ShowDialog()) @@ -80,7 +81,7 @@ namespace OpenRA.TilesetBuilder } } - private void numSize_ValueChanged(object sender, EventArgs e) + private void NumSizeValueChanged(object sender, EventArgs e) { TileSize = (int)numSize.Value; } diff --git a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj index a188900409..8315d2841b 100644 --- a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj +++ b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj @@ -74,25 +74,9 @@ - - Form - - - frmBuilder.cs - - - Form - - - frmNew.cs - - - - frmBuilder.cs - - frmNew.cs + FormNew.cs ResXFileCodeGenerator @@ -120,6 +104,21 @@ Component + + Form + + + FormBuilder.cs + + + FormBuilder.cs + + + Form + + + FormNew.cs + diff --git a/OpenRA.TilesetBuilder/Program.cs b/OpenRA.TilesetBuilder/Program.cs index fd46cfc805..30b97b39b4 100644 --- a/OpenRA.TilesetBuilder/Program.cs +++ b/OpenRA.TilesetBuilder/Program.cs @@ -21,17 +21,17 @@ namespace OpenRA.TilesetBuilder { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - //Console.WriteLine("{0} {1} {2} {3}",args[0], args[1], args[2], args[3]); + if (args.Length < 1) { - Application.Run(new frmBuilder("", "0", false, "Tilesets")); + Application.Run(new FormBuilder("", "0", false, "Tilesets")); } else { if (args.Contains("--export")) - Application.Run(new frmBuilder(args[0], args[1], true, args[3])); + Application.Run(new FormBuilder(args[0], args[1], true, args[3])); else - Application.Run(new frmBuilder(args[0], args[1], false, "Tilesets")); + Application.Run(new FormBuilder(args[0], args[1], false, "Tilesets")); } } } diff --git a/OpenRA.TilesetBuilder/Surface.cs b/OpenRA.TilesetBuilder/Surface.cs index d4259ba1b2..00f06f38ec 100644 --- a/OpenRA.TilesetBuilder/Surface.cs +++ b/OpenRA.TilesetBuilder/Surface.cs @@ -9,31 +9,29 @@ namespace OpenRA.TilesetBuilder class Surface : Control { public Bitmap Image; - private ImageList ImagesListControl; public int[,] TerrainTypes; public List