fix perf in ShroudRenderer
This commit is contained in:
@@ -52,7 +52,12 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
public void DrawAt( float2 location, string palette )
|
public void DrawAt( float2 location, string palette )
|
||||||
{
|
{
|
||||||
Game.Renderer.SpriteRenderer.DrawSprite( this, location, palette );
|
Game.Renderer.SpriteRenderer.DrawSprite( this, location, palette, this.size );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DrawAt( float2 location, int paletteIndex )
|
||||||
|
{
|
||||||
|
Game.Renderer.SpriteRenderer.DrawSprite( this, location, paletteIndex, this.size );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawAt(float2 location, string palette, float2 size)
|
public void DrawAt(float2 location, string palette, float2 size)
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ namespace OpenRA
|
|||||||
var minx = clipRect.Left;
|
var minx = clipRect.Left;
|
||||||
var maxx = clipRect.Right;
|
var maxx = clipRect.Right;
|
||||||
|
|
||||||
var shroudPalette = "fog";
|
var shroudPalette = Game.world.WorldRenderer.GetPaletteIndex("fog");
|
||||||
|
|
||||||
for (var j = miny; j < maxy; j++)
|
for (var j = miny; j < maxy; j++)
|
||||||
{
|
{
|
||||||
@@ -183,7 +183,7 @@ namespace OpenRA
|
|||||||
new float2(Game.CellSize * (maxx - starti), Game.CellSize));
|
new float2(Game.CellSize * (maxx - starti), Game.CellSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
shroudPalette = "shroud";
|
shroudPalette = Game.world.WorldRenderer.GetPaletteIndex("shroud");
|
||||||
|
|
||||||
for (var j = miny; j < maxy; j++)
|
for (var j = miny; j < maxy; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user