allow tilesheet row height to dynamically increase, to reduce premature splits

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1116 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2007-07-06 12:24:39 +00:00
parent 214176aaa6
commit 82c5154a91

View File

@@ -31,13 +31,16 @@ namespace OpenRa.FileFormats
if (current == null)
current = pageProvider();
if (imageSize.Height > rowHeight || rowHeight == 0 || imageSize.Width + x > pageSize.Width)
if (rowHeight == 0 || imageSize.Width + x > pageSize.Width)
{
y += rowHeight;
rowHeight = imageSize.Height;
x = 0;
}
if (imageSize.Height > rowHeight)
rowHeight = imageSize.Height;
if (y + imageSize.Height > pageSize.Height)
{
current = pageProvider();