Record the SheetType in each Sheet.

This commit is contained in:
Paul Chote
2015-09-28 18:23:25 +01:00
parent 426e187a4c
commit e819ff832b
13 changed files with 23 additions and 18 deletions

View File

@@ -40,16 +40,16 @@ namespace OpenRA.Graphics
int rowHeight = 0;
Point p;
public static Sheet AllocateSheet(int sheetSize)
public static Sheet AllocateSheet(SheetType type, int sheetSize)
{
return new Sheet(new Size(sheetSize, sheetSize));
return new Sheet(type, new Size(sheetSize, sheetSize));
}
public SheetBuilder(SheetType t)
: this(t, Game.Settings.Graphics.SheetSize) { }
public SheetBuilder(SheetType t, int sheetSize)
: this(t, () => AllocateSheet(sheetSize)) { }
: this(t, () => AllocateSheet(t, sheetSize)) { }
public SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
{