Use PaletteReferences everywhere.

This commit is contained in:
Paul Chote
2013-06-13 00:07:47 +12:00
parent e5bcb88b0e
commit 7beef85a64
14 changed files with 56 additions and 42 deletions

View File

@@ -45,17 +45,17 @@ namespace OpenRA.Graphics
}
}
public void DrawSprite(Sprite s, float2 location, WorldRenderer wr, string palette)
public void DrawSprite(Sprite s, float2 location, PaletteReference pal)
{
DrawSprite(s, location, wr.Palette(palette).Index, s.size);
DrawSprite(s, location, pal.Index, s.size);
}
public void DrawSprite(Sprite s, float2 location, WorldRenderer wr, string palette, float2 size)
public void DrawSprite(Sprite s, float2 location, PaletteReference pal, float2 size)
{
DrawSprite(s, location, wr.Palette(palette).Index, size);
DrawSprite(s, location, pal.Index, size);
}
public void DrawSprite(Sprite s, float2 location, int paletteIndex, float2 size)
void DrawSprite(Sprite s, float2 location, int paletteIndex, float2 size)
{
Renderer.CurrentBatchRenderer = this;