Remove obsolete WorldRenderer.DrawRangeCircle.

This commit is contained in:
Paul Chote
2015-11-29 13:28:41 +00:00
parent 170ef577d7
commit 78556ec60c
3 changed files with 6 additions and 17 deletions

View File

@@ -21,10 +21,6 @@ namespace OpenRA.Graphics
public static readonly Func<IRenderable, int> RenderableScreenZPositionComparisonKey =
r => ZPosition(r.Pos, r.ZOffset);
const int RangeCircleSegments = 32;
static readonly int[][] RangeCircleStartRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i).AsMatrix());
static readonly int[][] RangeCircleEndRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i + 6).AsMatrix());
public readonly Size TileSize;
public readonly World World;
public readonly Theater Theater;
@@ -214,17 +210,6 @@ namespace OpenRA.Graphics
new SelectionBarsRenderable(unit, true, true).Render(this);
}
public void DrawRangeCircle(WPos pos, WDist range, Color c)
{
var offset = new WVec(range.Length, 0, 0);
for (var i = 0; i < RangeCircleSegments; i++)
{
var pa = pos + offset.Rotate(RangeCircleStartRotations[i]);
var pb = pos + offset.Rotate(RangeCircleEndRotations[i]);
Game.Renderer.WorldLineRenderer.DrawLine(ScreenPosition(pa), ScreenPosition(pb), c);
}
}
public void DrawTargetMarker(Color c, float2 location)
{
var tl = new float2(-1 / Viewport.Zoom, -1 / Viewport.Zoom);