Nick Kastellanos 4 роки тому
батько
коміт
83302ba279

+ 6 - 0
Aether.Extras.PORTABLE.sln

@@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnimationImporters.PORTABLE
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Atlas.PORTABLE", "Atlas\Aether.Atlas.PORTABLE.csproj", "{E5907795-BC19-4CAA-9909-9F7145E1BB0D}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Tilemap.PORTABLE", "Tilemap\Aether.Tilemap.PORTABLE.csproj", "{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}"
+EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aether.Shaders", "Aether.Shaders", "{0193DE8C-8B7A-43F6-A30B-E65EC387B2C4}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aether.Shaders.Tilemap.PORTABLE", "Shaders\Tilemap\Aether.Shaders.Tilemap.PORTABLE.csproj", "{CA1564C9-D4A6-4454-A6B6-7B4E907DF8C0}"
@@ -51,6 +53,10 @@ Global
 		{E5907795-BC19-4CAA-9909-9F7145E1BB0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E5907795-BC19-4CAA-9909-9F7145E1BB0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E5907795-BC19-4CAA-9909-9F7145E1BB0D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}.Release|Any CPU.Build.0 = Release|Any CPU
 		{CA1564C9-D4A6-4454-A6B6-7B4E907DF8C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{CA1564C9-D4A6-4454-A6B6-7B4E907DF8C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{CA1564C9-D4A6-4454-A6B6-7B4E907DF8C0}.Release|Any CPU.ActiveCfg = Release|Any CPU

+ 6 - 0
Aether.Extras.WINDOWS.MG.sln

@@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLMCImporter.WINDOWS.MG", "
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VoxelImporters.WINDOWS.MG", "Content.Pipeline\VoxelImporters\VoxelImporters.WINDOWS.MG.csproj", "{AA15CF95-0AF2-4346-9465-CB6EDBE22ED9}"
 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
@@ -97,6 +99,10 @@ Global
 		{AA15CF95-0AF2-4346-9465-CB6EDBE22ED9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{AA15CF95-0AF2-4346-9465-CB6EDBE22ED9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AA15CF95-0AF2-4346-9465-CB6EDBE22ED9}.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

+ 6 - 0
Aether.Extras.WINDOWS.XNA.sln

@@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLMCImporter.WINDOWS.XNA",
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VoxelImporters.WINDOWS.XNA", "Content.Pipeline\VoxelImporters\VoxelImporters.WINDOWS.XNA.csproj", "{0690782F-0000-0000-0000-000000000000}"
 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
@@ -83,6 +85,10 @@ Global
 		{0690782F-0000-0000-0000-000000000000}.Debug|x86.Build.0 = Debug|x86
 		{0690782F-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|x86
 		{0690782F-0000-0000-0000-000000000000}.Release|x86.Build.0 = 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

+ 54 - 0
Tilemap/Aether.Tilemap.PORTABLE.csproj

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ProjectGuid>{94963AFA-FAC3-42A0-A2B2-4DA3A7F604D8}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>tainicom.Aether.Graphics</RootNamespace>
+    <AssemblyName>Aether.Tilemap</AssemblyName>
+    <TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\bin\Debug\Portable\</OutputPath>
+    <DefineConstants>DEBUG;PORTABLE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\bin\Release\Portable\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <DefineConstants>PORTABLE</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="Tilemap\Extensions.cs" />
+    <Compile Include="Tilemap\Tile.cs" />
+    <Compile Include="Tilemap\Tilemap.cs" />
+    <Compile Include="ContentReaders\TilemapReader.cs" />
+    <Compile Include="Properties\AssemblyInfo.PORTABLE.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <ItemGroup>
+    <PackageReference Include="MonoGame.Framework.Portable.9000" Version="3.8.9008">
+      <PrivateAssets>all</PrivateAssets>
+      <ExcludeAssets>runtime</ExcludeAssets>
+    </PackageReference>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Shaders\Tilemap\Aether.Shaders.Tilemap.PORTABLE.csproj">
+      <Project>{ca1564c9-d4a6-4454-a6b6-7b4e907df8c0}</Project>
+      <Name>Aether.Shaders.Tilemap.PORTABLE</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>

+ 69 - 0
Tilemap/Aether.Tilemap.WINDOWS.MG.csproj

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{7BD9F460-F3F9-40A0-B298-066EA975C06C}</ProjectGuid>
+    <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>tainicom.Aether.Graphics</RootNamespace>
+    <AssemblyName>Aether.Tilemap</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\bin\Debug\Windows\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WINDOWS MG MAPPEDMEM</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\bin\Release\Windows\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS MG MAPPEDMEM</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="MonoGame.Framework.Portable.9000" Version="3.8.9008">
+      <PrivateAssets>all</PrivateAssets>
+      <ExcludeAssets>runtime</ExcludeAssets>
+    </PackageReference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="mscorlib" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Tilemap\Extensions.cs" />
+    <Compile Include="Tilemap\Tile.cs" />
+    <Compile Include="Tilemap\Tilemap.cs" />
+    <Compile Include="ContentReaders\TilemapReader.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.MG.csproj">
+      <Project>{6721cd07-0880-4154-85af-ebe6043ef178}</Project>
+      <Name>Aether.Shaders.Tilemap.WINDOWS.MG</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>

+ 84 - 0
Tilemap/Aether.Tilemap.WINDOWS.XNA.csproj

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{746551BA-FB64-43B0-8479-0506B930D3E5}</ProjectGuid>
+    <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>tainicom.Aether.Graphics</RootNamespace>
+    <AssemblyName>Aether.Tilemap</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <XnaPlatform>Windows</XnaPlatform>
+    <XnaProfile>Reach</XnaProfile>
+    <XnaCrossPlatformGroupID>7637B8A4-FB9C-43EC-8ABC-602C818F00B5</XnaCrossPlatformGroupID>
+    <XnaOutputType>Library</XnaOutputType>
+    <!--
+    <XnaRefreshLevel>1</XnaRefreshLevel>
+    -->
+  </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>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\bin\Release\Windows.XNA\</OutputPath>
+    <DefineConstants>WINDOWS XNA</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>true</XnaCompressContent>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework, 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">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Tilemap\Extensions.cs" />
+    <Compile Include="Tilemap\Tile.cs" />
+    <Compile Include="Tilemap\Tilemap.cs" />
+    <Compile Include="ContentReaders\TilemapReader.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Shaders\Tilemap\Aether.Shaders.Tilemap.WINDOWS.XNA.csproj">
+      <Project>{AB2B4C7E-0FCA-4CFE-8837-E3E3374249F6}</Project>
+      <Name>Aether.Shaders.Tilemap.WINDOWS.XNA</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </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>

+ 87 - 0
Tilemap/ContentReaders/TilemapReader.cs

@@ -0,0 +1,87 @@
+#region License
+//   Copyright 2021 Kastellanos Nikolaos
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+#endregion
+
+using System;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using tainicom.Aether.Graphics;
+using tainicom.Aether.Shaders;
+
+namespace tainicom.Aether.Graphics.Content
+{
+    public class TilemapReader : ContentTypeReader<Tilemap>
+    {
+        protected override Tilemap Read(ContentReader input, Tilemap existingInstance)
+        {
+            IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
+            var device = graphicsDeviceService.GraphicsDevice;
+
+
+            Tilemap output = existingInstance ?? new Tilemap();
+
+            // read standard Texture2D
+            output.TextureAtlas = ReadTexture2D(input, output.TextureAtlas);
+
+            output.TextureMap = ReadTexture2D(input, output.TextureMap);
+
+            // read Sprites
+            var count = input.ReadInt32();
+            for (int i = 0; i < count; i++)
+            {
+                var name = input.ReadString();
+                var bounds = new Rectangle(input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
+                output.Sprites[name] = new Tile(output.TextureAtlas, bounds);
+            }
+
+            var tilemapEffect = new TilemapEffect(device);
+            tilemapEffect.Alpha = 1f;
+            tilemapEffect.VertexColorEnabled = true;
+            tilemapEffect.DiffuseColor = new Vector3(1f, 1f, 1f);
+            tilemapEffect.World = Matrix.Identity;
+            tilemapEffect.View = Matrix.Identity;
+            tilemapEffect.Projection = Matrix.Identity;
+
+            tilemapEffect.Texture = output.TextureMap;
+            tilemapEffect.TextureAtlas = output.TextureAtlas;
+            tilemapEffect.MapSize = new Vector2(output.TextureMap.Width, output.TextureMap.Height);
+            tilemapEffect.AtlasSize = new Vector2(
+                output.TextureAtlas.Width / output.Sprites["null"].Bounds.Width,
+                output.TextureAtlas.Height / output.Sprites["null"].Bounds.Height);
+            output.Effect = tilemapEffect;
+
+            return output;
+        }
+
+        private Texture2D ReadTexture2D(ContentReader input, Texture2D existingInstance)
+        {
+            Texture2D output = null;
+            try
+            {
+                output = input.ReadRawObject<Texture2D>(existingInstance);
+            }
+            catch(NotSupportedException)
+            {
+                var assembly = typeof(Microsoft.Xna.Framework.Content.ContentTypeReader).Assembly;
+                var texture2DReaderType = assembly.GetType("Microsoft.Xna.Framework.Content.Texture2DReader");
+                var texture2DReader = (ContentTypeReader)Activator.CreateInstance(texture2DReaderType, true);
+                output = input.ReadRawObject<Texture2D>(texture2DReader, existingInstance);
+            }
+            
+            return output;
+        }
+    }
+}

+ 24 - 0
Tilemap/Properties/AssemblyInfo.PORTABLE.cs

@@ -0,0 +1,24 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("Aether.Tilemap")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("Aether.Tilemap")]
+[assembly: AssemblyCopyright ("Copyright ©  Kastellanos Nikolaos 2021")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion ("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

+ 41 - 0
Tilemap/Properties/AssemblyInfo.cs

@@ -0,0 +1,41 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Aether.Tilemap")]
+[assembly: AssemblyProduct("Aether.Tilemap")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright ©  Kastellanos Nikolaos 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("38540D53-77A0-41C2-AAA2-20851B81EEF8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+#if WP7_1
+// Enable NEON/SIMD
+[assembly: CodeGeneration(CodeGenerationFlags.EnableFPIntrinsicsUsingSIMD)]
+#endif

+ 34 - 0
Tilemap/Tilemap/Extensions.cs

@@ -0,0 +1,34 @@
+#region License
+//   Copyright 2021 Kastellanos Nikolaos
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+#endregion
+
+using Microsoft.Xna.Framework;
+using tainicom.Aether.Graphics;
+
+namespace Microsoft.Xna.Framework.Graphics
+{
+    public static class Extensions
+    {
+        public static void Draw(this SpriteBatch spriteBatch, Tile sprite, Vector2 position, Color color)
+        {
+            spriteBatch.Draw(sprite.Texture, position, sprite.Bounds, color);
+        }
+        
+        public static void Draw(this SpriteBatch spriteBatch, Tile sprite, Rectangle destinationRectangle, Color color)
+        {
+            spriteBatch.Draw(sprite.Texture, destinationRectangle, sprite.Bounds, color);
+        }
+    }
+}

+ 33 - 0
Tilemap/Tilemap/Tile.cs

@@ -0,0 +1,33 @@
+#region License
+//   Copyright 2021 Kastellanos Nikolaos
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+#endregion
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace tainicom.Aether.Graphics
+{
+    public class Tile
+    {
+        public readonly Texture2D Texture;
+        public readonly Rectangle Bounds;
+
+        internal Tile(Texture2D texture, Rectangle bounds)
+        {
+            this.Texture = texture;
+            this.Bounds = bounds;
+        }
+    }
+}

+ 35 - 0
Tilemap/Tilemap/Tilemap.cs

@@ -0,0 +1,35 @@
+#region License
+//   Copyright 2021 Kastellanos Nikolaos
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+#endregion
+
+using System.Collections.Generic;
+using Microsoft.Xna.Framework.Graphics;
+using tainicom.Aether.Shaders;
+
+namespace tainicom.Aether.Graphics
+{
+    public class Tilemap
+    {
+        public Texture2D TextureAtlas { get; internal set; }
+        public Texture2D TextureMap { get; internal set; }
+        public TilemapEffect Effect { get; internal set;}
+        public readonly Dictionary<string, Tile> Sprites;
+
+        internal Tilemap()
+        {
+            this.Sprites = new Dictionary<string, Tile>();
+        }
+    }
+}