Remove the remaining legacy sprite plumbing.
This commit is contained in:
@@ -30,11 +30,6 @@ namespace OpenRA.Graphics
|
|||||||
bool DisableExportPadding { get; }
|
bool DisableExportPadding { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ISpriteSource
|
|
||||||
{
|
|
||||||
IReadOnlyList<ISpriteFrame> Frames { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SpriteLoader
|
public class SpriteLoader
|
||||||
{
|
{
|
||||||
public readonly SheetBuilder SheetBuilder;
|
public readonly SheetBuilder SheetBuilder;
|
||||||
@@ -69,9 +64,7 @@ namespace OpenRA.Graphics
|
|||||||
if (loader.TryParseSprite(stream, out frames))
|
if (loader.TryParseSprite(stream, out frames))
|
||||||
return frames;
|
return frames;
|
||||||
|
|
||||||
// Fall back to the hardcoded types (for now).
|
throw new InvalidDataException(filename + " is not a valid sprite file");
|
||||||
return SpriteSource.LoadSpriteSource(stream, filename).Frames
|
|
||||||
.ToArray();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -313,7 +313,6 @@
|
|||||||
<Compile Include="Map\ActorReference.cs" />
|
<Compile Include="Map\ActorReference.cs" />
|
||||||
<Compile Include="Support\Evaluator.cs" />
|
<Compile Include="Support\Evaluator.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="Graphics\SpriteSource.cs" />
|
|
||||||
<Compile Include="Graphics\PlayerColorRemap.cs" />
|
<Compile Include="Graphics\PlayerColorRemap.cs" />
|
||||||
<Compile Include="Graphics\Palette.cs" />
|
<Compile Include="Graphics\Palette.cs" />
|
||||||
<Compile Include="FileSystem\GlobalFileSystem.cs" />
|
<Compile Include="FileSystem\GlobalFileSystem.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user