Introduce IRenderable.IsDecoration and AsDecoration.

These are used to filter *Renderables that shouldn't
be copied for things like highlight or shadow.
This commit is contained in:
Paul Chote
2013-08-10 19:24:01 +12:00
parent 8fcbe7bb9e
commit be7fc57cdd
13 changed files with 43 additions and 24 deletions

View File

@@ -54,6 +54,7 @@ namespace OpenRA.Graphics
public float Scale { get { return scale; } }
public PaletteReference Palette { get { return palette; } }
public int ZOffset { get { return zOffset; } }
public bool IsDecoration { get { return false; } }
public IRenderable WithScale(float newScale)
{
@@ -83,6 +84,8 @@ namespace OpenRA.Graphics
palette, normalsPalette, shadowPalette);
}
public IRenderable AsDecoration() { return this; }
// This will need generalizing once we support TS/RA2 terrain
static readonly float[] groundNormal = new float[] {0,0,1,1};
public void BeforeRender(WorldRenderer wr)