Allow tilesets to specify their sheet size.

Decreased the default size from 4096 to 512.
This commit is contained in:
Paul Chote
2013-08-15 18:05:34 +12:00
parent f83ad88d2a
commit 7278739e45
3 changed files with 5 additions and 4 deletions

View File

@@ -42,11 +42,10 @@ namespace OpenRA.Graphics
Func<Sheet> allocate = () =>
{
if (allocated)
throw new SheetOverflowException("Terrain sheet overflow");
throw new SheetOverflowException("Terrain sheet overflow. Try increasing the tileset SheetSize parameter.");
allocated = true;
// TODO: Use a fixed sheet size specified in the tileset yaml
return SheetBuilder.AllocateSheet();
return new Sheet(new Size(tileset.SheetSize, tileset.SheetSize));
};
templates = new Dictionary<ushort, Sprite[]>();