Browse Source

Tilemap Sample

Nikos Kastellanos 6 years ago
parent
commit
92c20811b8
51 changed files with 872 additions and 0 deletions
  1. 27 0
      Samples.WINDOWS.MG.sln
  2. 32 0
      Samples.WINDOWS.XNA.sln
  3. BIN
      Samples/Tilemap/Game.ico
  4. 153 0
      Samples/Tilemap/Game1.cs
  5. BIN
      Samples/Tilemap/GameThumbnail.png
  6. BIN
      Samples/Tilemap/Icon.ico
  7. 19 0
      Samples/Tilemap/Program.cs
  8. 34 0
      Samples/Tilemap/Properties/AssemblyInfo.cs
  9. 89 0
      Samples/Tilemap/Samples.Tilemap.WINDOWS.MG.csproj
  10. 137 0
      Samples/Tilemap/Samples.Tilemap.WINDOWS.XNA.csproj
  11. 3 0
      Samples/Tilemap/app.config
  12. 42 0
      Samples/Tilemap/app.manifest
  13. BIN
      Samples/TilemapContent/Object/Bush_1.png
  14. BIN
      Samples/TilemapContent/Object/Bush_2.png
  15. BIN
      Samples/TilemapContent/Object/Bush_3.png
  16. BIN
      Samples/TilemapContent/Object/Bush_4.png
  17. BIN
      Samples/TilemapContent/Object/Crate.png
  18. BIN
      Samples/TilemapContent/Object/Mushroom_1.png
  19. BIN
      Samples/TilemapContent/Object/Mushroom_2.png
  20. BIN
      Samples/TilemapContent/Object/Sign_1.png
  21. BIN
      Samples/TilemapContent/Object/Sign_2.png
  22. BIN
      Samples/TilemapContent/Object/Stone.png
  23. BIN
      Samples/TilemapContent/Object/Tree_1.png
  24. BIN
      Samples/TilemapContent/Object/Tree_2.png
  25. BIN
      Samples/TilemapContent/Object/Tree_3.png
  26. 93 0
      Samples/TilemapContent/Samples.TilemapContent.contentproj
  27. 62 0
      Samples/TilemapContent/Samples.TilemapContent.mgcb
  28. BIN
      Samples/TilemapContent/Tiles/1.png
  29. BIN
      Samples/TilemapContent/Tiles/10.png
  30. BIN
      Samples/TilemapContent/Tiles/11.png
  31. BIN
      Samples/TilemapContent/Tiles/12.png
  32. BIN
      Samples/TilemapContent/Tiles/13.png
  33. BIN
      Samples/TilemapContent/Tiles/14.png
  34. BIN
      Samples/TilemapContent/Tiles/15.png
  35. BIN
      Samples/TilemapContent/Tiles/16.png
  36. BIN
      Samples/TilemapContent/Tiles/17.png
  37. BIN
      Samples/TilemapContent/Tiles/18.png
  38. BIN
      Samples/TilemapContent/Tiles/2.png
  39. BIN
      Samples/TilemapContent/Tiles/3.png
  40. BIN
      Samples/TilemapContent/Tiles/4.png
  41. BIN
      Samples/TilemapContent/Tiles/5.png
  42. BIN
      Samples/TilemapContent/Tiles/6.png
  43. BIN
      Samples/TilemapContent/Tiles/7.png
  44. BIN
      Samples/TilemapContent/Tiles/8.png
  45. BIN
      Samples/TilemapContent/Tiles/9.png
  46. 60 0
      Samples/TilemapContent/font.spritefont
  47. 1 0
      Samples/TilemapContent/free-platformer-game-tileset.txt
  48. 10 0
      Samples/TilemapContent/tilemapMipmap.tmx
  49. 10 0
      Samples/TilemapContent/tilemapMipmapPerSprite.tmx
  50. 10 0
      Samples/TilemapContent/tilemapNoMipmap.tmx
  51. 90 0
      Samples/TilemapContent/tileset.tsx

+ 27 - 0
Samples.WINDOWS.MG.sln

@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Graphics.WINDOWS.MG"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnimationImporters.WINDOWS.MG", "Content.Pipeline\AnimationImporters\AnimationImporters.WINDOWS.MG.csproj", "{D9A47306-DEE0-4410-BC2C-BA8FFCE682A3}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TilemapImporter.WINDOWS.MG", "Content.Pipeline\TilemapImporters\TilemapImporter.WINDOWS.MG.csproj", "{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Animation.WINDOWS.MG", "Animation\Aether.Animation.WINDOWS.MG.csproj", "{F08D6D4C-60FB-4543-8D81-594080EB8051}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aether.Shaders", "Aether.Shaders", "{13D47E11-4A7C-49C8-942E-2543E9C0098A}"
@@ -23,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.FXAA.WINDOWS
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.Deferred.WINDOWS.MG", "Shaders\Deferred\Aether.Shaders.Deferred.WINDOWS.MG.csproj", "{96105100-20DB-4187-9BCA-0A20AC9F1298}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.Tilemap.WINDOWS.MG", "Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.MG.csproj", "{6721CD07-0880-4154-85AF-EBE6043EF178}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlasImporter.WINDOWS.MG", "Content.Pipeline\AtlasImporter\AtlasImporter.WINDOWS.MG.csproj", "{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Atlas.WINDOWS.MG", "Atlas\Aether.Atlas.WINDOWS.MG.csproj", "{C7522B5E-B255-4FB6-A17A-9E6D217AEBD2}"
@@ -49,6 +53,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMC.WINDOWS.MG", "
 		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE} = {C9FA924B-DA91-4641-8B7D-CBC09E5560AE}
 	EndProjectSection
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Tilemap.WINDOWS.MG", "Samples\Tilemap\Samples.Tilemap.WINDOWS.MG.csproj", "{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Tilemap.WINDOWS.MG", "Tilemap\Aether.Tilemap.WINDOWS.MG.csproj", "{7BD9F460-F3F9-40A0-B298-066EA975C06C}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -75,6 +83,10 @@ Global
 		{D9A47306-DEE0-4410-BC2C-BA8FFCE682A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D9A47306-DEE0-4410-BC2C-BA8FFCE682A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D9A47306-DEE0-4410-BC2C-BA8FFCE682A3}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89}.Release|Any CPU.Build.0 = Release|Any CPU
 		{F08D6D4C-60FB-4543-8D81-594080EB8051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{F08D6D4C-60FB-4543-8D81-594080EB8051}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{F08D6D4C-60FB-4543-8D81-594080EB8051}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -87,6 +99,10 @@ Global
 		{96105100-20DB-4187-9BCA-0A20AC9F1298}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{96105100-20DB-4187-9BCA-0A20AC9F1298}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{96105100-20DB-4187-9BCA-0A20AC9F1298}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6721CD07-0880-4154-85AF-EBE6043EF178}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6721CD07-0880-4154-85AF-EBE6043EF178}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6721CD07-0880-4154-85AF-EBE6043EF178}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6721CD07-0880-4154-85AF-EBE6043EF178}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -123,6 +139,14 @@ Global
 		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7BD9F460-F3F9-40A0-B298-066EA975C06C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7BD9F460-F3F9-40A0-B298-066EA975C06C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7BD9F460-F3F9-40A0-B298-066EA975C06C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7BD9F460-F3F9-40A0-B298-066EA975C06C}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -132,8 +156,10 @@ Global
 		{48E4029A-115C-4DC2-AF3A-0AB94F36BFC0} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
 		{400DC7B2-739D-4156-916D-2F2E1920310D} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
 		{D9A47306-DEE0-4410-BC2C-BA8FFCE682A3} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
+		{9B0F9C6B-3C43-472D-B0C1-91E11A9FDE89} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
 		{FBBDE2BA-F9F3-4041-8584-2C912C235E26} = {13D47E11-4A7C-49C8-942E-2543E9C0098A}
 		{96105100-20DB-4187-9BCA-0A20AC9F1298} = {13D47E11-4A7C-49C8-942E-2543E9C0098A}
+		{6721CD07-0880-4154-85AF-EBE6043EF178} = {13D47E11-4A7C-49C8-942E-2543E9C0098A}
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
 		{08296A2E-BECF-4DB9-A518-8A613D07B80E} = {13D47E11-4A7C-49C8-942E-2543E9C0098A}
 		{53EA1090-FEE4-4F16-96C2-57DD6B75FA75} = {584E505E-859A-4DA8-9235-EE6C61C03479}
@@ -142,5 +168,6 @@ Global
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
 		{DC1BD888-3D11-4557-AC59-8271DC991ED1} = {584E505E-859A-4DA8-9235-EE6C61C03479}
+		{9B99798B-72F3-4E4B-9B99-DE15F7C955E9} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 	EndGlobalSection
 EndGlobal

+ 32 - 0
Samples.WINDOWS.XNA.sln

@@ -9,6 +9,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aether.Content.Pipeline", "
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnimationImporters.WINDOWS.XNA", "Content.Pipeline\AnimationImporters\AnimationImporters.WINDOWS.XNA.csproj", "{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TilemapImporter.WINDOWS.XNA", "Content.Pipeline\TilemapImporters\TilemapImporter.WINDOWS.XNA.csproj", "{B5FAF2D1-7164-4956-9474-0F4B19706DE8}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Animation.WINDOWS.XNA", "Animation\Aether.Animation.WINDOWS.XNA.csproj", "{1BD2DBC0-D366-42F7-9369-F566CCD01C03}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aether.Shaders", "Aether.Shaders", "{EFC7A27C-C20B-4BE7-8B3A-2B109991D704}"
@@ -17,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.FXAA.WINDOWS
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.Deferred.WINDOWS.XNA", "Shaders\Deferred\Aether.Shaders.Deferred.WINDOWS.XNA.csproj", "{B82B862D-C728-4A10-8A56-65D688E022C8}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.Tilemap.WINDOWS.XNA", "Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.XNA.csproj", "{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlasImporter.WINDOWS.XNA", "Content.Pipeline\AtlasImporter\AtlasImporter.WINDOWS.XNA.csproj", "{90E6017D-198B-4470-BF9B-8B8791C295CC}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Atlas.WINDOWS.XNA", "Atlas\Aether.Atlas.WINDOWS.XNA.csproj", "{644629BB-1A4E-4932-8E50-4F93BC938794}"
@@ -47,6 +51,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMC.WINDOWS.XNA",
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMCContent", "Samples\SLMCContent\Samples.SLMCContent.contentproj", "{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Tilemap.WINDOWS.XNA", "Samples\Tilemap\Samples.Tilemap.WINDOWS.XNA.csproj", "{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.TilemapContent", "Samples\TilemapContent\Samples.TilemapContent.contentproj", "{CC95FC77-31DC-4120-895C-4764ED092F4E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Tilemap.WINDOWS.XNA", "Tilemap\Aether.Tilemap.WINDOWS.XNA.csproj", "{746551BA-FB64-43B0-8479-0506B930D3E5}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|x86 = Debug|x86
@@ -65,6 +75,10 @@ Global
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E}.Debug|x86.Build.0 = Debug|x86
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E}.Release|x86.ActiveCfg = Release|x86
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E}.Release|x86.Build.0 = Release|x86
+		{B5FAF2D1-7164-4956-9474-0F4B19706DE8}.Debug|x86.ActiveCfg = Debug|x86
+		{B5FAF2D1-7164-4956-9474-0F4B19706DE8}.Debug|x86.Build.0 = Debug|x86
+		{B5FAF2D1-7164-4956-9474-0F4B19706DE8}.Release|x86.ActiveCfg = Release|x86
+		{B5FAF2D1-7164-4956-9474-0F4B19706DE8}.Release|x86.Build.0 = Release|x86
 		{1BD2DBC0-D366-42F7-9369-F566CCD01C03}.Debug|x86.ActiveCfg = Debug|x86
 		{1BD2DBC0-D366-42F7-9369-F566CCD01C03}.Debug|x86.Build.0 = Debug|x86
 		{1BD2DBC0-D366-42F7-9369-F566CCD01C03}.Release|x86.ActiveCfg = Release|x86
@@ -77,6 +91,10 @@ Global
 		{B82B862D-C728-4A10-8A56-65D688E022C8}.Debug|x86.Build.0 = Debug|x86
 		{B82B862D-C728-4A10-8A56-65D688E022C8}.Release|x86.ActiveCfg = Release|x86
 		{B82B862D-C728-4A10-8A56-65D688E022C8}.Release|x86.Build.0 = Release|x86
+		{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}.Debug|x86.ActiveCfg = Debug|x86
+		{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}.Debug|x86.Build.0 = Debug|x86
+		{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}.Release|x86.ActiveCfg = Release|x86
+		{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}.Release|x86.Build.0 = Release|x86
 		{90E6017D-198B-4470-BF9B-8B8791C295CC}.Debug|x86.ActiveCfg = Debug|x86
 		{90E6017D-198B-4470-BF9B-8B8791C295CC}.Debug|x86.Build.0 = Debug|x86
 		{90E6017D-198B-4470-BF9B-8B8791C295CC}.Release|x86.ActiveCfg = Release|x86
@@ -123,6 +141,16 @@ Global
 		{47F16ADE-1B63-476A-81AB-454C46ABD974}.Release|x86.Build.0 = Release|x86
 		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}.Debug|x86.ActiveCfg = Debug|x86
 		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}.Release|x86.ActiveCfg = Release|x86
+		{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}.Debug|x86.ActiveCfg = Debug|x86
+		{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}.Debug|x86.Build.0 = Debug|x86
+		{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}.Release|x86.ActiveCfg = Release|x86
+		{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}.Release|x86.Build.0 = Release|x86
+		{CC95FC77-31DC-4120-895C-4764ED092F4E}.Debug|x86.ActiveCfg = Debug|x86
+		{CC95FC77-31DC-4120-895C-4764ED092F4E}.Release|x86.ActiveCfg = Release|x86
+		{746551BA-FB64-43B0-8479-0506B930D3E5}.Debug|x86.ActiveCfg = Debug|x86
+		{746551BA-FB64-43B0-8479-0506B930D3E5}.Debug|x86.Build.0 = Debug|x86
+		{746551BA-FB64-43B0-8479-0506B930D3E5}.Release|x86.ActiveCfg = Release|x86
+		{746551BA-FB64-43B0-8479-0506B930D3E5}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -130,10 +158,12 @@ Global
 	GlobalSection(NestedProjects) = preSolution
 		{565ACF47-7E36-435E-8727-2AFB39E61134} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
+		{B5FAF2D1-7164-4956-9474-0F4B19706DE8} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{90E6017D-198B-4470-BF9B-8B8791C295CC} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{497B1130-EB63-4057-BC40-F60D6FFA50CA} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{89E0198E-7298-411A-B5C1-61F2754A3F80} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{B82B862D-C728-4A10-8A56-65D688E022C8} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
+		{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{908EC8FF-B0ED-478A-B486-702E578AF64A} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{8C971E86-ACD6-45E6-A4C2-7E0C556152FE} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{B02966BF-88BC-41B2-80EF-8F8C5F98FA98} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
@@ -145,5 +175,7 @@ Global
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{47F16ADE-1B63-476A-81AB-454C46ABD974} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
+		{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
+		{CC95FC77-31DC-4120-895C-4764ED092F4E} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 	EndGlobalSection
 EndGlobal

BIN
Samples/Tilemap/Game.ico


+ 153 - 0
Samples/Tilemap/Game1.cs

@@ -0,0 +1,153 @@
+using System;
+using System.IO;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using tainicom.Aether.Graphics;
+using tainicom.Aether.Shaders;
+
+namespace Samples.Atlas
+{
+    public class Game1 : Microsoft.Xna.Framework.Game
+    {
+        GraphicsDeviceManager graphics;
+        SpriteBatch spriteBatch;
+        SpriteFont font;
+
+        KeyboardState previousKeyboardState;
+
+        int mipLevel = 4;
+        bool showAtlas = false;
+        bool useGenerateBitmap = true;
+        bool useMipmapPerSprite = true;
+        Rectangle atlasSize = new Rectangle(0, 0, 1024, 512);
+        RenderTarget2D rt;
+
+
+        Tilemap tilemapMipmapPerSprite;
+        Tilemap tilemapMipmap;
+        Tilemap tilemapNoMipmap;
+        
+        public Game1()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            Content.RootDirectory = "Content";
+
+            graphics.PreferredBackBufferWidth = atlasSize.Width;
+            graphics.PreferredBackBufferHeight = atlasSize.Height;
+        }
+
+        protected override void LoadContent()
+        {
+            spriteBatch = new SpriteBatch(GraphicsDevice);
+            font = Content.Load<SpriteFont>("font");
+
+            rt = new RenderTarget2D(GraphicsDevice, atlasSize.Width, atlasSize.Height);
+
+            // Load tilemap
+            tilemapMipmapPerSprite = Content.Load<Tilemap>("tilemapMipmapPerSprite");
+            tilemapMipmap = Content.Load<Tilemap>("tilemapMipmap");
+            tilemapNoMipmap = Content.Load<Tilemap>("tilemapNoMipmap");
+
+#if DEBUG
+            using (var fs = File.Create("tilemapNoMipmapAtlas.png"))
+                tilemapNoMipmap.TextureAtlas.SaveAsPng(fs, tilemapNoMipmap.TextureAtlas.Width, tilemapNoMipmap.TextureAtlas.Height);
+            using (var fs = File.Create("tilemapMipmapAtlas.png"))
+                tilemapNoMipmap.TextureAtlas.SaveAsPng(fs, tilemapMipmap.TextureAtlas.Width, tilemapNoMipmap.TextureAtlas.Height);
+#endif
+            
+        }
+        
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Update(GameTime gameTime)
+        {
+            KeyboardState keyState = Keyboard.GetState();
+            GamePadState gamePadState = GamePad.GetState(PlayerIndex.One);
+
+            if (keyState.IsKeyDown(Keys.Escape) || gamePadState.Buttons.Back == ButtonState.Pressed)
+                Exit();
+
+            if (keyState.IsKeyDown(Keys.F1) && !previousKeyboardState.IsKeyDown(Keys.F1))
+                useMipmapPerSprite = !useMipmapPerSprite;
+            if (keyState.IsKeyDown(Keys.F2) && !previousKeyboardState.IsKeyDown(Keys.F2))
+                useGenerateBitmap = !useGenerateBitmap;
+            if (keyState.IsKeyDown(Keys.F3) && !previousKeyboardState.IsKeyDown(Keys.F3))
+                showAtlas = !showAtlas;
+            if (keyState.IsKeyDown(Keys.OemPlus) && !previousKeyboardState.IsKeyDown(Keys.OemPlus) && mipLevel < 10)
+                mipLevel++;
+            if (keyState.IsKeyDown(Keys.Add) && !previousKeyboardState.IsKeyDown(Keys.Add) && mipLevel < 10)
+                mipLevel++;
+            if (keyState.IsKeyDown(Keys.OemMinus) && !previousKeyboardState.IsKeyDown(Keys.OemMinus) && mipLevel > 0)
+                mipLevel--;
+            if (keyState.IsKeyDown(Keys.Subtract) && !previousKeyboardState.IsKeyDown(Keys.Subtract) && mipLevel > 0)
+                mipLevel--;
+            
+            previousKeyboardState = keyState;
+            base.Update(gameTime);
+        }
+        
+        protected override void Draw(GameTime gameTime)
+        {
+            GraphicsDevice.BlendState = BlendState.Opaque;
+            GraphicsDevice.DepthStencilState = DepthStencilState.Default;
+
+            GraphicsDevice.SetRenderTarget(rt);
+            GraphicsDevice.Clear(Color.Black);
+
+            var currentTilemap = (useGenerateBitmap) 
+                ? (useMipmapPerSprite ? tilemapMipmapPerSprite : tilemapMipmap)
+                : (tilemapNoMipmap);
+
+            int mipLevel2 = (int)Math.Pow(2, mipLevel);
+            var mipSize = atlasSize;
+            mipSize.Width /= mipLevel2;
+            mipSize.Height /= mipLevel2;
+            
+
+            if (showAtlas)
+            {
+                spriteBatch.Begin();
+                spriteBatch.Draw(currentTilemap.TextureAtlas, mipSize, Color.White);
+                spriteBatch.End();
+            }
+            else
+            {
+                DrawTilemap(gameTime, currentTilemap, mipSize);
+            }
+
+
+            GraphicsDevice.SetRenderTarget(null);
+            GraphicsDevice.Clear(Color.CornflowerBlue);
+            spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null);
+            spriteBatch.Draw(rt, atlasSize, mipSize, Color.White);
+            spriteBatch.End();
+
+            spriteBatch.Begin();
+            spriteBatch.DrawString(font, String.Format("[F1] MipmapPerSprite - ({0})", useMipmapPerSprite ? "ON" : "OFF"), new Vector2(20, 20), Color.White);
+            spriteBatch.DrawString(font, String.Format("[F2] GenerateMipmap - ({0})", useGenerateBitmap ? "ON" : "OFF"), new Vector2(20, 40), Color.White);
+            spriteBatch.DrawString(font, String.Format("[F3] {0}", showAtlas? "Show Tilemap" : "Show Atlas"), new Vector2(20, 60), Color.White);
+            spriteBatch.DrawString(font, String.Format("[+/-] MipLevel - ({0})", mipLevel), new Vector2(20, 80), Color.White);
+            spriteBatch.End();
+
+            base.Draw(gameTime);
+        }
+
+        private void DrawTilemap(GameTime gameTime, Tilemap tilemap, Rectangle mipSize)
+        {
+            // setup tilemapEffect
+            var viewport = GraphicsDevice.Viewport;
+            Matrix projection = Matrix.CreateOrthographicOffCenter(0, viewport.Width, viewport.Height, 0, 0, 1);
+            Matrix halfPixelOffset = Matrix.Identity;
+#if XNA
+            halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);
+#endif
+
+            tilemap.Effect.Projection = halfPixelOffset * projection;
+                        
+            // Draw tilemap
+            spriteBatch.Begin(0, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, tilemap.Effect);
+            spriteBatch.Draw(tilemap.TextureMap, mipSize, Color.White);
+            spriteBatch.End();
+        }
+    }
+}

BIN
Samples/Tilemap/GameThumbnail.png


BIN
Samples/Tilemap/Icon.ico


+ 19 - 0
Samples/Tilemap/Program.cs

@@ -0,0 +1,19 @@
+using System;
+
+namespace Samples.Atlas
+{
+#if WINDOWS || XBOX || LINUX
+    public static class Program
+    {
+        [STAThread]
+        static void Main(string[] args)
+        {
+            using (Game1 game = new Game1())
+            {
+                game.Run();
+            }
+        }
+    }
+#endif
+}
+

+ 34 - 0
Samples/Tilemap/Properties/AssemblyInfo.cs

@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Samples.Tilemap")]
+[assembly: AssemblyProduct("Samples.Tilemap")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © Kastellanos Nikolaos 2019-2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type. Only Windows
+// assemblies support COM.
+[assembly: ComVisible(false)]
+
+// On Windows, the following GUID is for the ID of the typelib if this
+// project is exposed to COM. On other platforms, it unique identifies the
+// title storage container when deploying this assembly to the device.
+[assembly: Guid("F24DB7E5-82FB-497D-A9D7-9C1B22AB9728")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]

+ 89 - 0
Samples/Tilemap/Samples.Tilemap.WINDOWS.MG.csproj

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{9B99798B-72F3-4E4B-9B99-DE15F7C955E9}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Samples.Tilemap</RootNamespace>
+    <AssemblyName>Samples.Tilemap</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MonoGamePlatform>Windows</MonoGamePlatform>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>Icon.ico</ApplicationIcon>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationManifest>app.manifest</ApplicationManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WINDOWS MG</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>true</Prefer32Bit>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS MG</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="Game1.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Icon.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <MonoGameContentReference Include="..\TilemapContent\Samples.TilemapContent.mgcb">
+      <Link>Content\Content.mgcb</Link>
+    </MonoGameContentReference>
+    <None Include="app.config" />
+    <None Include="app.manifest" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Atlas\Aether.Atlas.WINDOWS.MG.csproj">
+      <Project>{c7522b5e-b255-4fb6-a17a-9e6d217aebd2}</Project>
+      <Name>Aether.Atlas.WINDOWS.MG</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.MG.csproj">
+      <Project>{6721cd07-0880-4154-85af-ebe6043ef178}</Project>
+      <Name>Aether.Shaders.Tilemap.WINDOWS.MG</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Tilemap\Aether.Tilemap.WINDOWS.MG.csproj">
+      <Project>{7bd9f460-f3f9-40a0-b298-066ea975c06c}</Project>
+      <Name>Aether.Tilemap.WINDOWS.MG</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 137 - 0
Samples/Tilemap/Samples.Tilemap.WINDOWS.XNA.csproj

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{0586BA88-7CBC-493B-9B9F-B1AE7089ECDC}</ProjectGuid>
+    <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Samples.Tilemap</RootNamespace>
+    <AssemblyName>Samples.Tilemap</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <XnaPlatform>Windows</XnaPlatform>
+    <XnaProfile>Reach</XnaProfile>
+    <XnaCrossPlatformGroupID>FD62A179-B0DF-4ED3-898B-F1081CB0D364</XnaCrossPlatformGroupID>
+    <XnaOutputType>Game</XnaOutputType>
+    <ApplicationIcon>Game.ico</ApplicationIcon>
+    <Thumbnail>GameThumbnail.png</Thumbnail>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\Windows\XNA\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WINDOWS XNA</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>false</XnaCompressContent>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\Windows\XNA\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS XNA</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>true</XnaCompressContent>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="mscorlib" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Game1.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Game.ico" />
+    <Content Include="GameThumbnail.png">
+      <XnaPlatformSpecific>true</XnaPlatformSpecific>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Atlas\Aether.Atlas.WINDOWS.XNA.csproj">
+      <Project>{644629BB-1A4E-4932-8E50-4F93BC938794}</Project>
+      <Name>Aether.Atlas.WINDOWS.XNA</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.XNA.csproj">
+      <Project>{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}</Project>
+      <Name>Aether.Shaders.Tilemap.WINDOWS.XNA</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Tilemap\Aether.Tilemap.WINDOWS.XNA.csproj">
+      <Project>{746551BA-FB64-43B0-8479-0506B930D3E5}</Project>
+      <Name>Aether.Tilemap.WINDOWS.XNA</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\TilemapContent\Samples.TilemapContent.contentproj">
+      <Project>{CC95FC77-31DC-4120-895C-4764ED092F4E}</Project>
+      <Name>Samples.TilemapContent %28Content%29</Name>
+      <XnaReferenceType>Content</XnaReferenceType>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
+  <!--
+      To modify your build process, add your task inside one of the targets below and uncomment it. 
+      Other similar extension points exist, see Microsoft.Common.targets.
+      <Target Name="BeforeBuild">
+      </Target>
+      <Target Name="AfterBuild">
+      </Target>
+    -->
+</Project>

+ 3 - 0
Samples/Tilemap/app.config

@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

+ 42 - 0
Samples/Tilemap/app.manifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="Graphics"/>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- A list of the Windows versions that this application has been tested on and is
+           is designed to work with. Uncomment the appropriate elements and Windows will 
+           automatically selected the most compatible environment. -->
+
+      <!-- Windows Vista -->
+      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
+
+      <!-- Windows 7 -->
+      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
+
+      <!-- Windows 8 -->
+      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
+
+      <!-- Windows 8.1 -->
+      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
+
+      <!-- Windows 10 -->
+      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
+
+    </application>
+  </compatibility>
+
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
+    </windowsSettings>
+  </application>
+
+</assembly>

BIN
Samples/TilemapContent/Object/Bush_1.png


BIN
Samples/TilemapContent/Object/Bush_2.png


BIN
Samples/TilemapContent/Object/Bush_3.png


BIN
Samples/TilemapContent/Object/Bush_4.png


BIN
Samples/TilemapContent/Object/Crate.png


BIN
Samples/TilemapContent/Object/Mushroom_1.png


BIN
Samples/TilemapContent/Object/Mushroom_2.png


BIN
Samples/TilemapContent/Object/Sign_1.png


BIN
Samples/TilemapContent/Object/Sign_2.png


BIN
Samples/TilemapContent/Object/Stone.png


BIN
Samples/TilemapContent/Object/Tree_1.png


BIN
Samples/TilemapContent/Object/Tree_2.png


BIN
Samples/TilemapContent/Object/Tree_3.png


+ 93 - 0
Samples/TilemapContent/Samples.TilemapContent.contentproj

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{CC95FC77-31DC-4120-895C-4764ED092F4E}</ProjectGuid>
+    <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
+    <ContentRootDirectory>Content</ContentRootDirectory>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup>
+    <RootNamespace>Samples.AtlasContent</RootNamespace>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="font.spritefont">
+      <Name>font</Name>
+      <Importer>FontDescriptionImporter</Importer>
+      <Processor>FontDescriptionProcessor</Processor>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Content.Pipeline\AtlasImporter\AtlasImporter.WINDOWS.XNA.csproj">
+      <Project>{90E6017D-198B-4470-BF9B-8B8791C295CC}</Project>
+      <Name>AtlasImporter.WINDOWS.XNA</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Content.Pipeline\TilemapImporters\TilemapImporter.WINDOWS.XNA.csproj">
+      <Project>{B5FAF2D1-7164-4956-9474-0F4B19706DE8}</Project>
+      <Name>TilemapImporter.WINDOWS.XNA</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="tilemapMipmap.tmx">
+      <Name>tilemapMipmap</Name>
+      <Importer>TilemapImporter</Importer>
+      <Processor>TilemapProcessor</Processor>
+      <ProcessorParameters_ColorKeyEnabled>False</ProcessorParameters_ColorKeyEnabled>
+      <ProcessorParameters_GenerateMipmaps>True</ProcessorParameters_GenerateMipmaps>
+      <ProcessorParameters_MipmapsPerSprite>False</ProcessorParameters_MipmapsPerSprite>
+    </Compile>
+    <Compile Include="tilemapMipmapPerSprite.tmx">
+      <Name>tilemapMipmapPerSprite</Name>
+      <Importer>TilemapImporter</Importer>
+      <Processor>TilemapProcessor</Processor>
+      <ProcessorParameters_ColorKeyEnabled>False</ProcessorParameters_ColorKeyEnabled>
+      <ProcessorParameters_GenerateMipmaps>True</ProcessorParameters_GenerateMipmaps>
+    </Compile>
+    <Compile Include="tilemapNoMipmap.tmx">
+      <Name>tilemapNoMipmap</Name>
+      <Importer>TilemapImporter</Importer>
+      <Processor>TilemapProcessor</Processor>
+      <ProcessorParameters_ColorKeyEnabled>False</ProcessorParameters_ColorKeyEnabled>
+      <ProcessorParameters_MipmapsPerSprite>False</ProcessorParameters_MipmapsPerSprite>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
+  <!--  To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 62 - 0
Samples/TilemapContent/Samples.TilemapContent.mgcb

@@ -0,0 +1,62 @@
+
+#----------------------------- Global Properties ----------------------------#
+
+/outputDir:bin/$(Platform)
+/intermediateDir:obj/$(Platform)
+/platform:Windows
+/config:
+/profile:Reach
+/compress:False
+
+#-------------------------------- References --------------------------------#
+
+/reference:..\..\bin\Debug\Windows\Aether.Content.Pipeline.TilemapImporter.dll
+
+#---------------------------------- Content ---------------------------------#
+
+#begin font.spritefont
+/importer:FontDescriptionImporter
+/processor:FontDescriptionProcessor
+/processorParam:PremultiplyAlpha=True
+/processorParam:TextureFormat=Compressed
+/build:font.spritefont
+
+#begin tilemapMipmap.tmx
+/importer:TilemapImporter
+/processor:TilemapProcessor
+/processorParam:MipmapsPerSprite=False
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=False
+/processorParam:GenerateMipmaps=True
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:tilemapMipmap.tmx
+
+#begin tilemapMipmapPerSprite.tmx
+/importer:TilemapImporter
+/processor:TilemapProcessor
+/processorParam:MipmapsPerSprite=True
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=False
+/processorParam:GenerateMipmaps=True
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:tilemapMipmapPerSprite.tmx
+
+#begin tilemapNoMipmap.tmx
+/importer:TilemapImporter
+/processor:TilemapProcessor
+/processorParam:MipmapsPerSprite=False
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=False
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:tilemapNoMipmap.tmx
+

BIN
Samples/TilemapContent/Tiles/1.png


BIN
Samples/TilemapContent/Tiles/10.png


BIN
Samples/TilemapContent/Tiles/11.png


BIN
Samples/TilemapContent/Tiles/12.png


BIN
Samples/TilemapContent/Tiles/13.png


BIN
Samples/TilemapContent/Tiles/14.png


BIN
Samples/TilemapContent/Tiles/15.png


BIN
Samples/TilemapContent/Tiles/16.png


BIN
Samples/TilemapContent/Tiles/17.png


BIN
Samples/TilemapContent/Tiles/18.png


BIN
Samples/TilemapContent/Tiles/2.png


BIN
Samples/TilemapContent/Tiles/3.png


BIN
Samples/TilemapContent/Tiles/4.png


BIN
Samples/TilemapContent/Tiles/5.png


BIN
Samples/TilemapContent/Tiles/6.png


BIN
Samples/TilemapContent/Tiles/7.png


BIN
Samples/TilemapContent/Tiles/8.png


BIN
Samples/TilemapContent/Tiles/9.png


+ 60 - 0
Samples/TilemapContent/font.spritefont

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Segoe UI Mono</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>14</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>0</Spacing>
+
+    <!--
+    UseKerning controls the layout of the font. If this value is true, kerning information
+    will be used when placing characters.
+    -->
+    <UseKerning>true</UseKerning>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Regular</Style>
+
+    <!--
+    If you uncomment this line, the default character will be substituted if you draw
+    or measure text that contains characters which were not included in the font.
+    -->
+    <!-- <DefaultCharacter>*</DefaultCharacter> -->
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

+ 1 - 0
Samples/TilemapContent/free-platformer-game-tileset.txt

@@ -0,0 +1 @@
+http://www.gameart2d.com/free-platformer-game-tileset.html

+ 10 - 0
Samples/TilemapContent/tilemapMipmap.tmx

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<map version="1.0" orientation="orthogonal" renderorder="right-down" width="4" height="2" tilewidth="128" tileheight="128" nextobjectid="1">
+ <tileset firstgid="1" source="tileset.tsx"/>
+ <layer name="Tile Layer 1" width="4" height="2">
+  <data encoding="csv">
+29,24,25,0,
+1,2,2,18
+</data>
+ </layer>
+</map>

+ 10 - 0
Samples/TilemapContent/tilemapMipmapPerSprite.tmx

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<map version="1.0" orientation="orthogonal" renderorder="right-down" width="4" height="2" tilewidth="128" tileheight="128" nextobjectid="1">
+ <tileset firstgid="1" source="tileset.tsx"/>
+ <layer name="Tile Layer 1" width="4" height="2">
+  <data encoding="csv">
+29,24,25,0,
+1,2,2,18
+</data>
+ </layer>
+</map>

+ 10 - 0
Samples/TilemapContent/tilemapNoMipmap.tmx

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<map version="1.0" orientation="orthogonal" renderorder="right-down" width="4" height="2" tilewidth="128" tileheight="128" nextobjectid="1">
+ <tileset firstgid="1" source="tileset.tsx"/>
+ <layer name="Tile Layer 1" width="4" height="2">
+  <data encoding="csv">
+29,24,25,0,
+1,2,2,18
+</data>
+ </layer>
+</map>

+ 90 - 0
Samples/TilemapContent/tileset.tsx

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tileset name="1" tilewidth="133" tileheight="128" tilecount="29" columns="0">
+ <tile id="0">
+  <image width="128" height="128" source="Tiles/1.png"/>
+ </tile>
+ <tile id="1">
+  <image width="128" height="128" source="Tiles/2.png"/>
+ </tile>
+ <tile id="2">
+  <image width="128" height="128" source="Tiles/3.png"/>
+ </tile>
+ <tile id="3">
+  <image width="128" height="128" source="Tiles/4.png"/>
+ </tile>
+ <tile id="4">
+  <image width="128" height="128" source="Tiles/5.png"/>
+ </tile>
+ <tile id="5">
+  <image width="128" height="128" source="Tiles/6.png"/>
+ </tile>
+ <tile id="6">
+  <image width="128" height="128" source="Tiles/7.png"/>
+ </tile>
+ <tile id="7">
+  <image width="128" height="128" source="Tiles/8.png"/>
+ </tile>
+ <tile id="8">
+  <image width="128" height="128" source="Tiles/9.png"/>
+ </tile>
+ <tile id="9">
+  <image width="128" height="128" source="Tiles/10.png"/>
+ </tile>
+ <tile id="10">
+  <image width="128" height="128" source="Tiles/11.png"/>
+ </tile>
+ <tile id="11">
+  <image width="128" height="128" source="Tiles/12.png"/>
+ </tile>
+ <tile id="12">
+  <image width="128" height="93" source="Tiles/13.png"/>
+ </tile>
+ <tile id="13">
+  <image width="128" height="93" source="Tiles/14.png"/>
+ </tile>
+ <tile id="14">
+  <image width="128" height="93" source="Tiles/15.png"/>
+ </tile>
+ <tile id="15">
+  <image width="128" height="128" source="Tiles/16.png"/>
+ </tile>
+ <tile id="16">
+  <image width="128" height="99" source="Tiles/17.png"/>
+ </tile>
+ <tile id="17">
+  <image width="128" height="128" source="Tiles/18.png"/>
+ </tile>
+ <tile id="18">
+  <image width="133" height="65" source="Object/Bush_1.png"/>
+ </tile>
+ <tile id="19">
+  <image width="133" height="65" source="Object/Bush_2.png"/>
+ </tile>
+ <tile id="20">
+  <image width="73" height="47" source="Object/Bush_3.png"/>
+ </tile>
+ <tile id="21">
+  <image width="73" height="46" source="Object/Bush_4.png"/>
+ </tile>
+ <tile id="22">
+  <image width="77" height="77" source="Object/Crate.png"/>
+ </tile>
+ <tile id="23">
+  <image width="49" height="41" source="Object/Mushroom_1.png"/>
+ </tile>
+ <tile id="24">
+  <image width="50" height="41" source="Object/Mushroom_2.png"/>
+ </tile>
+ <tile id="25">
+  <image width="63" height="65" source="Object/Sign_1.png"/>
+ </tile>
+ <tile id="26">
+  <image width="62" height="64" source="Object/Sign_2.png"/>
+ </tile>
+ <tile id="27">
+  <image width="90" height="54" source="Object/Stone.png"/>
+ </tile>
+ <tile id="28">
+  <image width="116" height="44" source="Object/Tree_1.png"/>
+ </tile>
+</tileset>