Remove the remaining legacy sprite plumbing.

This commit is contained in:
Paul Chote
2014-10-05 16:37:07 +13:00
parent beb7a394a2
commit 6a72e87028
3 changed files with 1 additions and 46 deletions

View File

@@ -30,11 +30,6 @@ namespace OpenRA.Graphics
bool DisableExportPadding { get; }
}
public interface ISpriteSource
{
IReadOnlyList<ISpriteFrame> Frames { get; }
}
public class SpriteLoader
{
public readonly SheetBuilder SheetBuilder;
@@ -69,9 +64,7 @@ namespace OpenRA.Graphics
if (loader.TryParseSprite(stream, out frames))
return frames;
// Fall back to the hardcoded types (for now).
return SpriteSource.LoadSpriteSource(stream, filename).Frames
.ToArray();
throw new InvalidDataException(filename + " is not a valid sprite file");
}
}

View File

@@ -1,37 +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.Drawing;
using System.IO;
using OpenRA.FileFormats;
namespace OpenRA.Graphics
{
// TODO: Most of this should be moved into the format parsers themselves.
public enum SpriteType { Unknown }
public static class SpriteSource
{
public static SpriteType DetectSpriteType(Stream s)
{
return SpriteType.Unknown;
}
public static ISpriteSource LoadSpriteSource(Stream s, string filename)
{
var type = DetectSpriteType(s);
switch (type)
{
case SpriteType.Unknown:
default:
throw new InvalidDataException(filename + " is not a valid sprite file");
}
}
}
}

View File

@@ -313,7 +313,6 @@
<Compile Include="Map\ActorReference.cs" />
<Compile Include="Support\Evaluator.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Graphics\SpriteSource.cs" />
<Compile Include="Graphics\PlayerColorRemap.cs" />
<Compile Include="Graphics\Palette.cs" />
<Compile Include="FileSystem\GlobalFileSystem.cs" />