Autoflush renderer. Sprite.DrawAt convenience function.

This commit is contained in:
Bob
2010-09-24 16:04:22 +12:00
parent cdcfeb6276
commit 14e517cab5
29 changed files with 87 additions and 96 deletions

View File

@@ -84,7 +84,7 @@ namespace OpenRA.Traits
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.IsExplored(kv.Key))
continue;
Game.Renderer.SpriteRenderer.DrawSprite(bibSprites[kv.Value.type - 1][kv.Value.image],
bibSprites[kv.Value.type - 1][kv.Value.image].DrawAt(
Game.CellSize * kv.Key, "terrain");
}
}

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Traits
var c = content[x, y];
if (c.image != null)
Game.Renderer.SpriteRenderer.DrawSprite(c.image[c.density],
c.image[c.density].DrawAt(
Game.CellSize * new int2(x, y),
c.type.info.Palette);
}