diff --git a/MLEM.Extended/MLEM.Extended.csproj b/MLEM.Extended/MLEM.Extended.csproj
index 7378d80..b6327c9 100644
--- a/MLEM.Extended/MLEM.Extended.csproj
+++ b/MLEM.Extended/MLEM.Extended.csproj
@@ -17,7 +17,7 @@
all
-
+
all
diff --git a/MLEM.Startup/MLEM.Startup.csproj b/MLEM.Startup/MLEM.Startup.csproj
index c2a9a6a..31220e8 100644
--- a/MLEM.Startup/MLEM.Startup.csproj
+++ b/MLEM.Startup/MLEM.Startup.csproj
@@ -18,7 +18,7 @@
-
+
all
diff --git a/MLEM.sln b/MLEM.sln
index b0d646a..4012969 100644
--- a/MLEM.sln
+++ b/MLEM.sln
@@ -6,6 +6,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MLEM.Extended", "MLEM.Exten
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MLEM.Startup", "MLEM.Startup\MLEM.Startup.csproj", "{997F4739-7BEC-4621-B9CA-68DEB2D74412}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{1BC4682B-AA14-4937-B5C7-707E20FE88FF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -24,5 +26,9 @@ Global
{997F4739-7BEC-4621-B9CA-68DEB2D74412}.Debug|Any CPU.Build.0 = Debug|Any CPU
{997F4739-7BEC-4621-B9CA-68DEB2D74412}.Release|Any CPU.ActiveCfg = Release|Any CPU
{997F4739-7BEC-4621-B9CA-68DEB2D74412}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1BC4682B-AA14-4937-B5C7-707E20FE88FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BC4682B-AA14-4937-B5C7-707E20FE88FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1BC4682B-AA14-4937-B5C7-707E20FE88FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1BC4682B-AA14-4937-B5C7-707E20FE88FF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/MLEM/MLEM.csproj b/MLEM/MLEM.csproj
index 88b82de..74bc156 100644
--- a/MLEM/MLEM.csproj
+++ b/MLEM/MLEM.csproj
@@ -14,7 +14,7 @@
-
+
all
diff --git a/MLEM/Misc/AutoTiling.cs b/MLEM/Misc/AutoTiling.cs
index f9d3059..59594b4 100644
--- a/MLEM/Misc/AutoTiling.cs
+++ b/MLEM/Misc/AutoTiling.cs
@@ -18,13 +18,12 @@ namespace MLEM.Misc {
var xDl = down && left ? connectsTo(-1, 1) ? 0 : 4 : left ? 1 : down ? 3 : 2;
var xDr = down && right ? connectsTo(1, 1) ? 0 : 4 : right ? 1 : down ? 3 : 2;
- 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, halfSizeX, halfSizeY), color, rotation, org, sc, SpriteEffects.None, layerDepth);
- batch.Draw(texture, new Vector2(x + 0.5F * sizeX * sc.X, y), new Rectangle(textureRegion.X + halfSizeX + xUr * sizeX, textureRegion.Y + 0, halfSizeX, halfSizeY), color, rotation, org, sc, SpriteEffects.None, layerDepth);
- batch.Draw(texture, new Vector2(x, y + 0.5F * sizeY * sc.Y), new Rectangle(textureRegion.X + xDl * sizeX, textureRegion.Y + halfSizeY, halfSizeX, halfSizeY), color, rotation, org, sc, SpriteEffects.None, layerDepth);
- batch.Draw(texture, new Vector2(x + 0.5F * sizeX * sc.X, y + 0.5F * sizeY * sc.Y), new Rectangle(textureRegion.X + halfSizeX + xDr * sizeX, textureRegion.Y + halfSizeY, halfSizeX, halfSizeY), color, rotation, org, sc, SpriteEffects.None, layerDepth);
+ var size = textureRegion.Size;
+ var halfSize = new Point(size.X / 2, size.Y / 2);
+ batch.Draw(texture, new Vector2(pos.X, pos.Y), new Rectangle(textureRegion.X + 0 + xUl * size.X, textureRegion.Y + 0, halfSize.X, halfSize.Y), color, rotation, org, sc, SpriteEffects.None, layerDepth);
+ batch.Draw(texture, new Vector2(pos.X + 0.5F * size.X * sc.X, pos.Y), new Rectangle(textureRegion.X + halfSize.X + xUr * size.X, textureRegion.Y + 0, halfSize.X, halfSize.Y), color, rotation, org, sc, SpriteEffects.None, layerDepth);
+ batch.Draw(texture, new Vector2(pos.X, pos.Y + 0.5F * size.Y * sc.Y), new Rectangle(textureRegion.X + xDl * size.X, textureRegion.Y + halfSize.Y, halfSize.X, halfSize.Y), color, rotation, org, sc, SpriteEffects.None, layerDepth);
+ batch.Draw(texture, new Vector2(pos.X + 0.5F * size.X * sc.X, pos.Y + 0.5F * size.Y * sc.Y), new Rectangle(textureRegion.X + halfSize.X + xDr * size.X, textureRegion.Y + halfSize.Y, halfSize.X, halfSize.Y), color, rotation, org, sc, SpriteEffects.None, layerDepth);
}
public delegate bool ConnectsTo(int xOff, int yOff);
diff --git a/Tests/GameImpl.cs b/Tests/GameImpl.cs
new file mode 100644
index 0000000..7e988ef
--- /dev/null
+++ b/Tests/GameImpl.cs
@@ -0,0 +1,8 @@
+using MLEM.Startup;
+
+namespace Tests {
+ public class GameImpl : MlemGame {
+
+
+ }
+}
\ No newline at end of file
diff --git a/Tests/Program.cs b/Tests/Program.cs
new file mode 100644
index 0000000..e5cb607
--- /dev/null
+++ b/Tests/Program.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Tests {
+ public static class Program {
+
+ public static void Main() {
+ using (var game = new GameImpl())
+ game.Run();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
new file mode 100644
index 0000000..6ff6d48
--- /dev/null
+++ b/Tests/Tests.csproj
@@ -0,0 +1,18 @@
+
+
+
+ Exe
+ netcoreapp2.0
+
+
+
+
+
+
+
+
+
+
+
+
+