From 356ed25ec6552d49714f2581954840f17717a9ce Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Sat, 26 Sep 2015 17:20:08 +1000 Subject: [PATCH 1/3] First isometric render pass --- .../TestData/isometric.tmx | 76 ++++++++++++++++++ .../TestData/isometric_tileset.png | Bin 0 -> 4599 bytes .../TiledMapImporterProcessorTests.cs | 2 + .../Tiled/TiledMapWriter.cs | 4 +- .../MonoGame.Extended/Maps/Tiled/TiledMap.cs | 12 +-- .../Maps/Tiled/TiledMapOrientation.cs | 14 ++++ .../Maps/Tiled/TiledMapReader.cs | 3 +- .../Maps/Tiled/TiledTileLayer.cs | 76 +++++++++++++++--- .../MonoGame.Extended.csproj | 1 + Source/Sandbox/Content/Content.mgcb | 25 ++++-- Source/Sandbox/Content/isometric.tmx | 55 +++++++++++++ Source/Sandbox/Content/isometric_tileset.png | Bin 0 -> 4599 bytes 12 files changed, 242 insertions(+), 26 deletions(-) create mode 100644 Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric.tmx create mode 100644 Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric_tileset.png create mode 100644 Source/MonoGame.Extended/Maps/Tiled/TiledMapOrientation.cs create mode 100644 Source/Sandbox/Content/isometric.tmx create mode 100644 Source/Sandbox/Content/isometric_tileset.png diff --git a/Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric.tmx b/Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric.tmx new file mode 100644 index 00000000..3f3168c7 --- /dev/null +++ b/Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric.tmx @@ -0,0 +1,76 @@ + + + + + + + + + + + + + +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,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+ + + + + + + + + + + + diff --git a/Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric_tileset.png b/Source/MonoGame.Extended.Content.Pipeline.Tests/TestData/isometric_tileset.png new file mode 100644 index 0000000000000000000000000000000000000000..4c6f1b4ffc44b24f37fc3e71c00973c8da32df89 GIT binary patch literal 4599 zcmZ`-hf@<@7hOVt(1d^#m0qPIhzKGC2t}n!3*8W;C?LH`?JymRh3^D?b0OgP!jvH<|VdCe4VL!T4=>kwx8 zIG}rLm_9Lt*q9gqjiW*<^cQC24HGzU^528*smZ5DSnru4LI8lB_rJ~n6qgFpgDj!f z%#B!P+47vHuBqstGSOeqJS1q3Y+kkhCY|6^cl9Z7Bs6tmlIyC>E2cdwU1T@0ZxJ`}uw9L#`9 z8vnmVUK*rH=V2?%vA$2V_X-;zNJIK)mgeN$P6|ZuSBwS*k7~VB9Cl3N$M@QcbmKY` zLS(Zuri~Xbu*1HMY5kf!H1}j!)Yxsx631Ry0)@)NYhzdqlOkZp>6GkX*$a&%;Vfzy z>R|J{=AXo$c-n%;k=r9Oal31^$VTR?eSoSNs*Ge@U?3NY)u>nG0%Ycw~BKa z6{6!_q%I`Og)-vc;h^;*sNTy3c9q0M6b^ex>%lkMMy58-^u01e+X$*jL9D->Z6$uM z07&b6G?o2nQ#jWVNY|a}4#3uBkBwq;GeqDL(cGBTLx|qmKWFN6i{AHR3PzOq-Z1vv z@J$#HiwYmOz*N1b>f<$Dof4zSDO9w;9cVi#BBgY(?z_lj+<8~MTbXjFHiAhDt0%WI z&q#esCGl?Qw{_Snc>G8_lAbDP7Fh#TiMqZbtSzAGw&chEdKC>@oB>B5xX)+l^;E?E z6eKMa#fXCpI)3xEI{75^Efg_9@?*nRwE&XsdhQ)&G2VX5FS%?+lJ0SSY=&JroJ(;Z z7$CMlq*G+(%{PWgiaUW`RlxEpy2xgqpBpCKKiPl7a#;Mv5TBq#>odUa^TC(8Uj`+~ z*{onW4mmP74Wc9lyi>e^0@1VIR$r+e(Qa{LC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*idJLWbk5Dhh$0VZIv?ciCCXw4zlyvDb?64vgC|lu+{F9K zIs{xU6>2-6{d$!}@bs-752!(x{5uG1OE_24xcSui0qK(c`s0F3bf;L@?3pvMDkQJE zR#c{nv21>+a%^$zy&u(=a&mgS$H-S2OW`lU7cPSp0>;P+XJA@6#J9`aD>1vU2m>D- z28@on=j{v=JuFfAbyxiA z?uS&=b#7RF6!jVBPb z>pYLTzl;rJ2=6B1HDo-SVpP=51l${6>1d1$N2@gP5scnUkq7{S-eSOjnmAoLP6H)A>ZA6)9{p5i~?Eu}%fJ94`l^t;l8qwX?05l>`T~wcDy)_HA{R z{=89Ctq^Xtzsu`vkn&Lo*VJ+HU0sY^6r z=ionqC~#Hk%3!H~&EH%iGo=T6o@E5@UkF!AQsW5WdNg@UZJ_vmzqlAp#A zPX>&#hlA*C@j}tkh9)o48HajI4tD7-d{+~Ee_knL?n}Q`O}Zq0HGFyZDr2{-xIC7C zZYP>SB=Ays*9No%D1X(); _tilesets = new List(); + Orientation = orientation; } private readonly List _tilesets; private readonly GraphicsDevice _graphicsDevice; private readonly List _layers; - public int Width { get; private set; } - public int Height { get; private set; } - public int TileWidth { get; private set; } - public int TileHeight { get; private set; } + public int Width { get; } + public int Height { get; } + public int TileWidth { get; } + public int TileHeight { get; } public Color? BackgroundColor { get; set; } public TiledRenderOrder RenderOrder { get; set; } public TiledProperties Properties { get; private set; } + public TiledMapOrientation Orientation { get; } public IEnumerable Layers { diff --git a/Source/MonoGame.Extended/Maps/Tiled/TiledMapOrientation.cs b/Source/MonoGame.Extended/Maps/Tiled/TiledMapOrientation.cs new file mode 100644 index 00000000..b877c4c5 --- /dev/null +++ b/Source/MonoGame.Extended/Maps/Tiled/TiledMapOrientation.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MonoGame.Extended.Maps.Tiled +{ + public enum TiledMapOrientation + { + Orthogonal = 1, + Isometric = 2, + Staggered = 3 + } +} diff --git a/Source/MonoGame.Extended/Maps/Tiled/TiledMapReader.cs b/Source/MonoGame.Extended/Maps/Tiled/TiledMapReader.cs index ce9c2641..8b3e3933 100644 --- a/Source/MonoGame.Extended/Maps/Tiled/TiledMapReader.cs +++ b/Source/MonoGame.Extended/Maps/Tiled/TiledMapReader.cs @@ -16,7 +16,8 @@ namespace MonoGame.Extended.Maps.Tiled width: reader.ReadInt32(), height: reader.ReadInt32(), tileWidth: reader.ReadInt32(), - tileHeight: reader.ReadInt32()) + tileHeight: reader.ReadInt32(), + orientation: (TiledMapOrientation)reader.ReadInt32()) { BackgroundColor = backgroundColor, RenderOrder = renderOrder diff --git a/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs b/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs index 32a5e85a..f2f1620e 100644 --- a/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs +++ b/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs @@ -54,22 +54,76 @@ namespace MonoGame.Extended.Maps.Tiled { var region = _map.GetTileRegion(tile.Id); - if (region != null) - { - // not exactly sure why we need to compensate 1 pixel here. Could be a bug in MonoGame? - var tx = tile.X * (_map.TileWidth - 1); - var ty = tile.Y * (_map.TileHeight - 1); - - _spriteBatch.Draw(region, new Rectangle(tx, ty, region.Width, region.Height), Color.White); - } + if(region == null) continue; + + RenderLayer(_map, tile, region); } _spriteBatch.End(); } - + + private void RenderLayer(TiledMap map, TiledTile tile, TextureRegion2D region) + { + switch (map.Orientation) + { + case TiledMapOrientation.Orthogonal: + RenderOrthogonal(tile,region); + break; + case TiledMapOrientation.Isometric: + RenderIsometric(tile, region); + break; + case TiledMapOrientation.Staggered: + throw new NotImplementedException("Staggered maps are currently not supported"); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + + private void RenderOrthogonal(TiledTile tile, TextureRegion2D region) + { + // not exactly sure why we need to compensate 1 pixel here. Could be a bug in MonoGame? + var tx = tile.X*(_map.TileWidth - 1); + var ty = tile.Y*(_map.TileHeight - 1); + + _spriteBatch.Draw(region, new Rectangle(tx, ty, region.Width, region.Height), Color.White); + } + + private void RenderIsometric(TiledTile tile, TextureRegion2D region) + { + //drawPos.X = ((mapObject.Bounds.X) - (Camera.Position.X)) * Camera.Zoom; + //drawPos.Y = ((mapObject.Bounds.Y) - (Camera.Position.Y)) * Camera.Zoom; + + ////Currently changing position and rotation when just rotating + //float rotation = 0;//MathHelper.ToRadians(mapObject.Rotation); + //Texture2D texture = tileSet.Texture; + //Rectangle source = tile.Source; + //Color renderColor = mapObjectLayer.OpacityColor; + //Vector2 origin = tile.Origin; + //var effect = SpriteEffects.None; + //SpriteBatch.Draw(texture, drawPos, source, renderColor, rotation, origin, Camera.Zoom, + // effect, 1.0f); + + //nPos.X = ((tile.Bounds.X + tileSet.TileOffsetX + (map.TileWidth / 2)) - (Camera.Position.X)) * Camera.Zoom; + //nPos.Y = ((tile.Bounds.Y + tileSet.TileOffsetY + (map.TileHeight / 2)) - (Camera.Position.Y)) * Camera.Zoom; + + //var tx = (tile.X + (_map.TileWidth/2)); + //var ty = (tile.Y + (_map.TileHeight/2)); + + var tx = (tile.X*(_map.TileWidth/2)) - (tile.Y*(_map.TileWidth/2)); + var ty = (tile.Y*(_map.TileHeight/2)) + (tile.X*(_map.TileHeight/2)); + + //var result = new Vector2 + //{ + // X = (mapPosition.X * (map.TileWidth / 2)) - (mapPosition.Y * (map.TileWidth / 2)), + // Y = (mapPosition.Y * (map.TileHeight / 2)) + (mapPosition.X * (map.TileHeight / 2)) - (map.TileHeight / 2) + //}; + _spriteBatch.Draw(region, new Rectangle(tx, ty, region.Width, region.Height), Color.White); + } + public TiledTile GetTile(int x, int y) { - return _tiles[x + y * Width]; + return _tiles[x + y*Width]; } private Func> GetRenderOrderFunction() @@ -115,7 +169,7 @@ namespace MonoGame.Extended.Maps.Tiled yield return GetTile(x, y); } } - + private IEnumerable GetTilesLeftUp() { for (var y = Height - 1; y >= 0; y--) diff --git a/Source/MonoGame.Extended/MonoGame.Extended.csproj b/Source/MonoGame.Extended/MonoGame.Extended.csproj index 95fcbb28..d8724924 100644 --- a/Source/MonoGame.Extended/MonoGame.Extended.csproj +++ b/Source/MonoGame.Extended/MonoGame.Extended.csproj @@ -55,6 +55,7 @@ + diff --git a/Source/Sandbox/Content/Content.mgcb b/Source/Sandbox/Content/Content.mgcb index fdfb056d..feb35e0c 100644 --- a/Source/Sandbox/Content/Content.mgcb +++ b/Source/Sandbox/Content/Content.mgcb @@ -6,6 +6,7 @@ /platform:Windows /config: /profile:Reach +/compress:False #-------------------------------- References --------------------------------# @@ -21,7 +22,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:hills.png @@ -36,7 +36,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:tmw_desert_spacing.png @@ -48,7 +47,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:free-tileset.png @@ -65,7 +63,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:test-tileset.png @@ -82,7 +79,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:stump.png @@ -119,7 +115,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:fireball.png @@ -136,7 +131,6 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:zombie.png @@ -153,7 +147,22 @@ /processorParam:GenerateMipmaps=False /processorParam:PremultiplyAlpha=True /processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False /processorParam:TextureFormat=Color /build:Fonts/courier-new-32_0.png +#begin isometric.tmx +/importer:TiledMapImporter +/processor:TiledMapProcessor +/build:isometric.tmx + +#begin isometric_tileset.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:TextureFormat=Color +/build:isometric_tileset.png + diff --git a/Source/Sandbox/Content/isometric.tmx b/Source/Sandbox/Content/isometric.tmx new file mode 100644 index 00000000..00f5ad3f --- /dev/null +++ b/Source/Sandbox/Content/isometric.tmx @@ -0,0 +1,55 @@ + + + + + + + + + + + + +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,1,1,2,2,2,2,2,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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,1,1,0,1,0,1,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,1,1,1,1,0,1,1,2,2,1,1,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,1,1,1,2,1,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +0,0,0,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,0,0,1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0,1,1,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,1,1,1,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + + + diff --git a/Source/Sandbox/Content/isometric_tileset.png b/Source/Sandbox/Content/isometric_tileset.png new file mode 100644 index 0000000000000000000000000000000000000000..4c6f1b4ffc44b24f37fc3e71c00973c8da32df89 GIT binary patch literal 4599 zcmZ`-hf@<@7hOVt(1d^#m0qPIhzKGC2t}n!3*8W;C?LH`?JymRh3^D?b0OgP!jvH<|VdCe4VL!T4=>kwx8 zIG}rLm_9Lt*q9gqjiW*<^cQC24HGzU^528*smZ5DSnru4LI8lB_rJ~n6qgFpgDj!f z%#B!P+47vHuBqstGSOeqJS1q3Y+kkhCY|6^cl9Z7Bs6tmlIyC>E2cdwU1T@0ZxJ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o=T6o@E5@UkF!AQsW5WdNg@UZJ_vmzqlAp#A zPX>&#hlA*C@j}tkh9)o48HajI4tD7-d{+~Ee_knL?n}Q`O}Zq0HGFyZDr2{-xIC7C zZYP>SB=Ays*9No%D1X Date: Sat, 26 Sep 2015 18:15:55 +1000 Subject: [PATCH 2/3] Fix rendering to match what is seen in Tiled --- .../MonoGame.Extended/Maps/Tiled/TiledMap.cs | 7 +++- .../Maps/Tiled/TiledTileLayer.cs | 35 +++++-------------- Source/Sandbox/Content/isometric.tmx | 3 ++ 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/Source/MonoGame.Extended/Maps/Tiled/TiledMap.cs b/Source/MonoGame.Extended/Maps/Tiled/TiledMap.cs index 45721d44..78a62672 100644 --- a/Source/MonoGame.Extended/Maps/Tiled/TiledMap.cs +++ b/Source/MonoGame.Extended/Maps/Tiled/TiledMap.cs @@ -9,7 +9,12 @@ namespace MonoGame.Extended.Maps.Tiled { public class TiledMap { - public TiledMap(GraphicsDevice graphicsDevice, int width, int height, int tileWidth, int tileHeight, TiledMapOrientation orientation) + public TiledMap(GraphicsDevice graphicsDevice, + int width, + int height, + int tileWidth, + int tileHeight, + TiledMapOrientation orientation = TiledMapOrientation.Orthogonal) { Width = width; Height = height; diff --git a/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs b/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs index f2f1620e..43412a2c 100644 --- a/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs +++ b/Source/MonoGame.Extended/Maps/Tiled/TiledTileLayer.cs @@ -91,33 +91,16 @@ namespace MonoGame.Extended.Maps.Tiled private void RenderIsometric(TiledTile tile, TextureRegion2D region) { - //drawPos.X = ((mapObject.Bounds.X) - (Camera.Position.X)) * Camera.Zoom; - //drawPos.Y = ((mapObject.Bounds.Y) - (Camera.Position.Y)) * Camera.Zoom; + var tx = (tile.X*(_map.TileWidth / 2)) - (tile.Y*(_map.TileWidth / 2)) + //Center + + (_map.Width * (_map.TileWidth/2)) + //Compensate Bug? + - (_map.TileWidth / 2); + + var ty = (tile.Y*(_map.TileHeight/2)) + (tile.X*(_map.TileHeight/2)) + //Compensate Bug? + - (_map.TileWidth + _map.TileHeight); - ////Currently changing position and rotation when just rotating - //float rotation = 0;//MathHelper.ToRadians(mapObject.Rotation); - //Texture2D texture = tileSet.Texture; - //Rectangle source = tile.Source; - //Color renderColor = mapObjectLayer.OpacityColor; - //Vector2 origin = tile.Origin; - //var effect = SpriteEffects.None; - //SpriteBatch.Draw(texture, drawPos, source, renderColor, rotation, origin, Camera.Zoom, - // effect, 1.0f); - - //nPos.X = ((tile.Bounds.X + tileSet.TileOffsetX + (map.TileWidth / 2)) - (Camera.Position.X)) * Camera.Zoom; - //nPos.Y = ((tile.Bounds.Y + tileSet.TileOffsetY + (map.TileHeight / 2)) - (Camera.Position.Y)) * Camera.Zoom; - - //var tx = (tile.X + (_map.TileWidth/2)); - //var ty = (tile.Y + (_map.TileHeight/2)); - - var tx = (tile.X*(_map.TileWidth/2)) - (tile.Y*(_map.TileWidth/2)); - var ty = (tile.Y*(_map.TileHeight/2)) + (tile.X*(_map.TileHeight/2)); - - //var result = new Vector2 - //{ - // X = (mapPosition.X * (map.TileWidth / 2)) - (mapPosition.Y * (map.TileWidth / 2)), - // Y = (mapPosition.Y * (map.TileHeight / 2)) + (mapPosition.X * (map.TileHeight / 2)) - (map.TileHeight / 2) - //}; _spriteBatch.Draw(region, new Rectangle(tx, ty, region.Width, region.Height), Color.White); } diff --git a/Source/Sandbox/Content/isometric.tmx b/Source/Sandbox/Content/isometric.tmx index 00f5ad3f..452b2440 100644 --- a/Source/Sandbox/Content/isometric.tmx +++ b/Source/Sandbox/Content/isometric.tmx @@ -8,6 +8,9 @@ + + + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, From 197db4e529e0041602a3ed402f7b884d90a82381 Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Sat, 26 Sep 2015 18:20:56 +1000 Subject: [PATCH 3/3] Fix formatting --- .../TiledMapImporterProcessorTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/MonoGame.Extended.Content.Pipeline.Tests/TiledMapImporterProcessorTests.cs b/Source/MonoGame.Extended.Content.Pipeline.Tests/TiledMapImporterProcessorTests.cs index e01bd243..92d15ad2 100644 --- a/Source/MonoGame.Extended.Content.Pipeline.Tests/TiledMapImporterProcessorTests.cs +++ b/Source/MonoGame.Extended.Content.Pipeline.Tests/TiledMapImporterProcessorTests.cs @@ -73,7 +73,8 @@ namespace MonoGame.Extended.Content.Pipeline.Tests Assert.AreEqual("1", tileLayer1.Properties[0].Value); Assert.AreEqual("customlayerprop2", tileLayer1.Properties[1].Name); - Assert.AreEqual("2", tileLayer1.Properties[1].Value);} + Assert.AreEqual("2", tileLayer1.Properties[1].Value); + } [Test] public void TiledMapImporter_Xml_Test()