Allow sequences to define a Scale factor.

This commit is contained in:
Paul Chote
2020-12-31 17:46:25 +00:00
committed by teinarss
parent fd75e03d9c
commit f6b40b2bce
9 changed files with 20 additions and 13 deletions

View File

@@ -113,6 +113,7 @@ namespace OpenRA.Mods.Common.Graphics
int[] ISpriteSequence.Frames { get { throw exception; } }
Rectangle ISpriteSequence.Bounds { get { throw exception; } }
bool ISpriteSequence.IgnoreWorldTint { get { throw exception; } }
float ISpriteSequence.Scale { get { throw exception; } }
Sprite ISpriteSequence.GetSprite(int frame) { throw exception; }
Sprite ISpriteSequence.GetSprite(int frame, WAngle facing) { throw exception; }
Sprite ISpriteSequence.GetShadow(int frame, WAngle facing) { throw exception; }
@@ -140,6 +141,7 @@ namespace OpenRA.Mods.Common.Graphics
public int[] Frames { get; private set; }
public Rectangle Bounds { get; private set; }
public bool IgnoreWorldTint { get; private set; }
public float Scale { get; private set; }
public readonly uint[] EmbeddedPalette;
@@ -184,6 +186,7 @@ namespace OpenRA.Mods.Common.Graphics
transpose = LoadField(d, "Transpose", false);
Frames = LoadField<int[]>(d, "Frames", null);
IgnoreWorldTint = LoadField(d, "IgnoreWorldTint", false);
Scale = LoadField(d, "Scale", 1f);
var flipX = LoadField(d, "FlipX", false);
var flipY = LoadField(d, "FlipY", false);