diff --git a/OpenRA.FileFormats/Map/TileSet.cs b/OpenRA.FileFormats/Map/TileSet.cs index 3ea082473d..29639db9b8 100644 --- a/OpenRA.FileFormats/Map/TileSet.cs +++ b/OpenRA.FileFormats/Map/TileSet.cs @@ -77,6 +77,7 @@ namespace OpenRA.FileFormats { public string Name; public string Id; + public int SheetSize = 512; public string Palette; public string PlayerPalette; public string[] Extensions; @@ -85,7 +86,7 @@ namespace OpenRA.FileFormats public Dictionary Templates = new Dictionary(); public string[] EditorTemplateOrder; - static readonly string[] fields = {"Name", "TileSize", "Id", "Palette", "Extensions"}; + static readonly string[] fields = {"Name", "TileSize", "Id", "SheetSize", "Palette", "Extensions"}; public TileSet() {} diff --git a/OpenRA.Game/Graphics/Theater.cs b/OpenRA.Game/Graphics/Theater.cs index 4ef7f0ef81..e509a02b24 100644 --- a/OpenRA.Game/Graphics/Theater.cs +++ b/OpenRA.Game/Graphics/Theater.cs @@ -42,11 +42,10 @@ namespace OpenRA.Graphics Func 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(); diff --git a/mods/d2k/tilesets/arrakis.yaml b/mods/d2k/tilesets/arrakis.yaml index bb522a7027..0327fbe592 100644 --- a/mods/d2k/tilesets/arrakis.yaml +++ b/mods/d2k/tilesets/arrakis.yaml @@ -1,6 +1,7 @@ General: Name: Arrakis Id: ARRAKIS + SheetSize: 1024 Palette: d2k.pal Extensions: .bas,.bat,.bgb,.ice,.tre,.was,.ext,.shp