Add ShpRemastered sprite loader.
This commit is contained in:
@@ -75,6 +75,11 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
||||
public byte[] Data { get; private set; }
|
||||
public bool DisableExportPadding { get { return false; } }
|
||||
|
||||
public TgaFrame()
|
||||
{
|
||||
Data = new byte[0];
|
||||
}
|
||||
|
||||
public TgaFrame(Stream stream)
|
||||
{
|
||||
using (var tga = Targa.Create(stream, new PfimConfig()))
|
||||
@@ -90,6 +95,13 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TgaFrame(Stream stream, Size frameSize, Rectangle frameWindow)
|
||||
: this(stream)
|
||||
{
|
||||
FrameSize = frameSize;
|
||||
Offset = 0.5f * new float2(frameWindow.Left + frameWindow.Right - FrameSize.Width, frameWindow.Top + frameWindow.Bottom - FrameSize.Height);
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<ISpriteFrame> Frames { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user