Introduce MapCache and MapPreview for improved UI map previews.

This commit is contained in:
Paul Chote
2014-03-14 13:30:03 +13:00
parent 63068d5a7c
commit c30b18a9d6
20 changed files with 407 additions and 290 deletions

View File

@@ -67,6 +67,14 @@ namespace OpenRA.Graphics
return rect;
}
public Sprite Add(Bitmap src)
{
var rect = Allocate(src.Size);
Util.FastCopyIntoSprite(rect, src);
current.CommitData();
return rect;
}
public Sprite Add(Size size, byte paletteIndex)
{
var data = new byte[size.Width * size.Height];