minimap: add support for sprite scaling to SpriteRenderer/Graphics.Util
This commit is contained in:
@@ -55,12 +55,17 @@ namespace OpenRa.Game.Graphics
|
||||
}
|
||||
|
||||
public void DrawSprite(Sprite s, float2 location, PaletteType palette)
|
||||
{
|
||||
DrawSprite(s, location, palette, s.size);
|
||||
}
|
||||
|
||||
public void DrawSprite(Sprite s, float2 location, PaletteType palette, float2 size)
|
||||
{
|
||||
if (s.sheet != currentSheet)
|
||||
Flush();
|
||||
|
||||
currentSheet = s.sheet;
|
||||
Util.FastCreateQuad(vertices, indices, location.ToInt2(), s, (int) palette, nv, ni);
|
||||
Util.FastCreateQuad(vertices, indices, location.ToInt2(), s, (int)palette, nv, ni, size);
|
||||
nv += 4; ni += 6;
|
||||
if (++sprites >= spritesPerBatch)
|
||||
Flush();
|
||||
|
||||
Reference in New Issue
Block a user