From ad0da91ecca9fd6cd65aeb646aa34e48d3240e96 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 5 Oct 2014 15:24:42 +1300 Subject: [PATCH] Remove --transpose utility command. The engine has supported transposed sprites for a long time now. --- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 - .../UtilityCommands/TransposeShpCommand.cs | 48 ------------------- 2 files changed, 49 deletions(-) delete mode 100644 OpenRA.Mods.Common/UtilityCommands/TransposeShpCommand.cs diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 25a741cc5d..a88493ac08 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -87,7 +87,6 @@ - diff --git a/OpenRA.Mods.Common/UtilityCommands/TransposeShpCommand.cs b/OpenRA.Mods.Common/UtilityCommands/TransposeShpCommand.cs deleted file mode 100644 index 0f5f5be222..0000000000 --- a/OpenRA.Mods.Common/UtilityCommands/TransposeShpCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using OpenRA.FileFormats; - -namespace OpenRA.Mods.Common.UtilityCommands -{ - class TransposeShpCommand : IUtilityCommand - { - public string Name { get { return "--transpose"; } } - - [Desc("SRCSHP DESTSHP START N M [START N M ...]", - "Transpose the N*M block of frames starting at START.")] - public void Run(ModData modData, string[] args) - { - var srcImage = ShpReader.Load(args[1]); - - var srcFrames = srcImage.Frames; - var destFrames = srcImage.Frames.ToArray(); - - for (var z = 3; z < args.Length - 2; z += 3) - { - var start = Exts.ParseIntegerInvariant(args[z]); - var m = Exts.ParseIntegerInvariant(args[z + 1]); - var n = Exts.ParseIntegerInvariant(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]; - } - - using (var destStream = File.Create(args[2])) - ShpReader.Write(destStream, srcImage.Size, destFrames.Select(f => f.Data)); - } - } -}