Add depth buffer support to sprites and sequences.

This commit is contained in:
Paul Chote
2015-10-01 18:55:54 +01:00
parent 2634643d91
commit 2915db67c4
15 changed files with 44 additions and 39 deletions

View File

@@ -109,7 +109,7 @@ namespace OpenRA.Mods.Common.Traits
pipImages.PlayFetchIndex("groups", () => (int)group);
pipImages.Tick();
var pos = basePosition - (0.5f * pipImages.Image.Size).ToInt2() + new int2(9, 5);
var pos = basePosition - (0.5f * pipImages.Image.Size.XY).ToInt2() + new int2(9, 5);
yield return new UISpriteRenderable(pipImages.Image, self.CenterPosition, pos, 0, pal, 1f);
}
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Traits
var pipImages = new Animation(self.World, "pips");
pipImages.PlayRepeating(PipStrings[0]);
var pipSize = pipImages.Image.Size.ToInt2();
var pipSize = pipImages.Image.Size.XY.ToInt2();
var pipxyBase = basePosition + new int2(1 - pipSize.X / 2, -(3 + pipSize.Y / 2));
var pipxyOffset = new int2(0, 0);
var pal = wr.Palette(Info.Palette);