Remove Sprite.DrawAt.
This commit is contained in:
@@ -93,7 +93,7 @@ namespace OpenRA.Graphics
|
|||||||
public void BeforeRender(WorldRenderer wr) {}
|
public void BeforeRender(WorldRenderer wr) {}
|
||||||
public void Render(WorldRenderer wr)
|
public void Render(WorldRenderer wr)
|
||||||
{
|
{
|
||||||
sprite.DrawAt(ScreenPosition(wr), palette, scale);
|
Game.Renderer.WorldSpriteRenderer.DrawSprite(sprite, ScreenPosition(wr), palette, sprite.size*scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenderDebugGeometry(WorldRenderer wr)
|
public void RenderDebugGeometry(WorldRenderer wr)
|
||||||
|
|||||||
@@ -184,24 +184,26 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
if (starti != i)
|
if (starti != i)
|
||||||
{
|
{
|
||||||
s[starti, j].DrawAt(
|
// Stretch a solid black sprite over the rows above
|
||||||
|
// TODO: This doesn't make sense for isometric terrain
|
||||||
|
Game.Renderer.WorldSpriteRenderer.DrawSprite(
|
||||||
|
s[starti, j],
|
||||||
Game.CellSize * new float2(starti, j),
|
Game.CellSize * new float2(starti, j),
|
||||||
pal,
|
pal,
|
||||||
new float2(Game.CellSize * (i - starti), Game.CellSize));
|
new float2(Game.CellSize * (i - starti), Game.CellSize));
|
||||||
starti = i + 1;
|
starti = i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s[i, j].DrawAt(
|
Game.Renderer.WorldSpriteRenderer.DrawSprite(s[i, j], Game.CellSize * new float2(i, j), pal);
|
||||||
Game.CellSize * new float2(i, j),
|
|
||||||
pal);
|
|
||||||
starti = i + 1;
|
starti = i + 1;
|
||||||
last = s[i, j];
|
last = s[i, j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stretch a solid black sprite over the rows to the left
|
||||||
|
// TODO: This doesn't make sense for isometric terrain
|
||||||
if (starti < clip.Right)
|
if (starti < clip.Right)
|
||||||
s[starti, j].DrawAt(
|
Game.Renderer.WorldSpriteRenderer.DrawSprite(s[starti, j],
|
||||||
Game.CellSize * new float2(starti, j),
|
Game.CellSize * new float2(starti, j), pal,
|
||||||
pal,
|
|
||||||
new float2(Game.CellSize * (clip.Right - starti), Game.CellSize));
|
new float2(Game.CellSize * (clip.Right - starti), Game.CellSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,21 +55,6 @@ namespace OpenRA.Graphics
|
|||||||
{
|
{
|
||||||
return textureCoords[k];
|
return textureCoords[k];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawAt(float2 location, PaletteReference pal)
|
|
||||||
{
|
|
||||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(this, location, pal, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DrawAt(float2 location, PaletteReference pal, float scale)
|
|
||||||
{
|
|
||||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(this, location, pal, size*scale);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DrawAt(float2 location, PaletteReference pal, float2 size)
|
|
||||||
{
|
|
||||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(this, location, pal, size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum TextureChannel
|
public enum TextureChannel
|
||||||
|
|||||||
Reference in New Issue
Block a user