From e69a541e1ee987ccf873d00a8cad5529235c6b99 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 6 Aug 2019 23:04:06 +0200 Subject: [PATCH] fix sizing issue with auto tiles --- MLEM/Misc/AutoTiling.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MLEM/Misc/AutoTiling.cs b/MLEM/Misc/AutoTiling.cs index ff4de86..c423cdf 100644 --- a/MLEM/Misc/AutoTiling.cs +++ b/MLEM/Misc/AutoTiling.cs @@ -18,10 +18,10 @@ namespace MLEM.Misc { var (x, y) = pos; var (sizeX, sizeY) = textureRegion.Size; var (halfSizeX, halfSizeY) = new Point(sizeX / 2, sizeY / 2); - batch.Draw(texture, new Vector2(x, y), new Rectangle(textureRegion.X + 0 + xUl * sizeX, textureRegion.Y + 0, sizeX, sizeY), color); - batch.Draw(texture, new Vector2(x + 0.5F * sizeX, y), new Rectangle(textureRegion.X + halfSizeX + xUr * sizeX, textureRegion.Y + 0, sizeX, sizeY), color); - batch.Draw(texture, new Vector2(x, y + 0.5F * sizeY), new Rectangle(textureRegion.X + xDl * sizeX, textureRegion.Y + halfSizeY, sizeX, sizeY), color); - batch.Draw(texture, new Vector2(x + 0.5F * sizeX, y + 0.5F * sizeY), new Rectangle(textureRegion.X + halfSizeX + xDr * sizeX, textureRegion.Y + halfSizeY, sizeX, sizeY), color); + batch.Draw(texture, new Vector2(x, y), new Rectangle(textureRegion.X + 0 + xUl * sizeX, textureRegion.Y + 0, halfSizeX, halfSizeY), color); + batch.Draw(texture, new Vector2(x + 0.5F * sizeX, y), new Rectangle(textureRegion.X + halfSizeX + xUr * sizeX, textureRegion.Y + 0, halfSizeX, halfSizeY), color); + batch.Draw(texture, new Vector2(x, y + 0.5F * sizeY), new Rectangle(textureRegion.X + xDl * sizeX, textureRegion.Y + halfSizeY, halfSizeX, halfSizeY), color); + batch.Draw(texture, new Vector2(x + 0.5F * sizeX, y + 0.5F * sizeY), new Rectangle(textureRegion.X + halfSizeX + xDr * sizeX, textureRegion.Y + halfSizeY, halfSizeX, halfSizeY), color); } public delegate bool ConnectsTo(int xOff, int yOff);