Locate devmode code largely in the trait, reduce exploitability.

This commit is contained in:
alzeih
2010-07-26 14:58:23 +12:00
parent 10c7674433
commit 30241ddccc
7 changed files with 85 additions and 74 deletions

View File

@@ -32,12 +32,12 @@ namespace OpenRA.Graphics
uiOverlay = new UiOverlay();
palette = new HardwarePalette(world.Map);
}
public int GetPaletteIndex(string name) { return palette.GetPaletteIndex(name); }
public Palette GetPalette(string name) { return palette.GetPalette(name); }
public void AddPalette(string name, Palette pal) { palette.AddPalette(name, pal); }
public void UpdatePalette(string name, Palette pal) { palette.UpdatePalette(name, pal); }
class SpriteComparer : IComparer<Renderable>
{
public int Compare(Renderable x, Renderable y)
@@ -172,8 +172,8 @@ namespace OpenRA.Graphics
Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(0, -4), c, c);
Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(-4, 0), c, c);
Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(0, -4), c, c);
}
}
public void DrawLocus(Color c, int2[] cells)
{
var dict = cells.ToDictionary(a => a, a => 0);