Nikos Kastellanos 1 year ago
parent
commit
ea3ea950ef
44 changed files with 330 additions and 327 deletions
  1. 1 1
      Animation/Animation/Animations.cs
  2. 2 2
      Animation/Animation/Extensions.cs
  3. 13 13
      Animation/ContentReaders/CpuAnimatedVertexBufferReader.cs
  4. 8 7
      Atlas/ContentReaders/TextureAtlasReader.cs
  5. 5 5
      Content.Pipeline/AnimationImporters/Processors/AnimationsProcessor.cs
  6. 6 6
      Content.Pipeline/AnimationImporters/Processors/CpuAnimatedModelProcessor.cs
  7. 3 2
      Content.Pipeline/AnimationImporters/Processors/GpuAnimatedModelProcessor.cs
  8. 1 1
      Content.Pipeline/AnimationImporters/Serialization/AnimationsWriter.cs
  9. 38 38
      Content.Pipeline/AtlasImporter/AtlasImporter.cs
  10. 14 14
      Content.Pipeline/AtlasImporter/Processors/TextureAtlasProcessor.cs
  11. 2 2
      Content.Pipeline/AtlasImporter/Serialization/TextureAtlasWriter.cs
  12. 8 8
      Content.Pipeline/DDSImporter/DDSImporter.cs
  13. 6 6
      Content.Pipeline/DDSImporter/DDSProcessor.cs
  14. 2 2
      Content.Pipeline/DDSImporter/DXT1Block.cs
  15. 1 1
      Content.Pipeline/GraphicsImporters/Graphics/DynamicModelContent.cs
  16. 1 1
      Content.Pipeline/GraphicsImporters/Graphics/DynamicModelMeshContent.cs
  17. 4 4
      Content.Pipeline/GraphicsImporters/Processors/DynamicModelProcessor.cs
  18. 5 5
      Content.Pipeline/GraphicsImporters/Serialization/DynamicIndexBufferWriter.cs
  19. 7 7
      Content.Pipeline/GraphicsImporters/Serialization/DynamicModelWriter.cs
  20. 3 3
      Content.Pipeline/RawModelProcessor/RawModelProcessor.cs
  21. 13 13
      Content.Pipeline/SLMCImporter/SLMCImporter.cs
  22. 9 9
      Content.Pipeline/TilemapImporters/Processors/TilePacker.cs
  23. 13 13
      Content.Pipeline/TilemapImporters/Processors/TilemapProcessor.cs
  24. 2 2
      Content.Pipeline/TilemapImporters/Serialization/TilemapWriter.cs
  25. 14 14
      Content.Pipeline/TilemapImporters/Tilemap/TilemapContent.cs
  26. 3 3
      Content.Pipeline/TilemapImporters/Tilemap/XMLExtensions.cs
  27. 27 27
      Content.Pipeline/TilemapImporters/TilemapImporter.cs
  28. 14 14
      Content.Pipeline/VoxelImporters/Vox/VoxImporter.cs
  29. 4 4
      Content.Pipeline/VoxelImporters/VoxelContent.cs
  30. 32 32
      Content.Pipeline/VoxelImporters/VoxelModelImporter.cs
  31. 6 6
      Graphics/ContentReaders/DynamicIndexBufferReader.cs
  32. 3 3
      Graphics/ContentReaders/DynamicVertexBufferReader.cs
  33. 6 6
      Shaders/Deferred/DeferredBasicEffect.cs
  34. 6 6
      Shaders/Deferred/DeferredClearGBufferEffect.cs
  35. 6 6
      Shaders/Deferred/DeferredCombineEffect.cs
  36. 6 6
      Shaders/Deferred/DeferredPointLightEffect.cs
  37. 6 6
      Shaders/Deferred/DeferredSpotLightEffect.cs
  38. 5 5
      Shaders/FXAA/FXAAEffect.cs
  39. 1 1
      Shaders/FXAA/FXAAGreenLumaHighEffect.cs
  40. 1 1
      Shaders/FXAA/FXAAGreenLumaLowEffect.cs
  41. 1 1
      Shaders/FXAA/FXAAGreenLumaMediumEffect.cs
  42. 7 7
      Shaders/InfiniteGrid/InfiniteGridEffect.cs
  43. 6 6
      Shaders/Tilemap/TilemapEffect.cs
  44. 9 8
      Tilemap/ContentReaders/TilemapReader.cs

+ 1 - 1
Animation/Animation/Animations.cs

@@ -70,7 +70,7 @@ namespace nkast.Aether.Animation
 
 
         public void SetClip(string clipName)
         public void SetClip(string clipName)
         {
         {
-            var clip = Clips["Base Stack"];
+            Clip clip = Clips["Base Stack"];
             SetClip(clip);
             SetClip(clip);
         }
         }
 
 

+ 2 - 2
Animation/Animation/Extensions.cs

@@ -24,13 +24,13 @@ namespace nkast.Aether.Animation
     {
     {
         public static Animations GetAnimations(this Model model)
         public static Animations GetAnimations(this Model model)
         {
         {
-            var animations = model.Tag as Animations;
+            Animations animations = model.Tag as Animations;
             return animations;
             return animations;
         }
         }
 
 
         public static void UpdateVertices(this ModelMeshPart meshPart, Matrix[] boneTransforms)
         public static void UpdateVertices(this ModelMeshPart meshPart, Matrix[] boneTransforms)
         {
         {
-            var animatedVertexBuffer = meshPart.VertexBuffer as CpuAnimatedVertexBuffer;
+            CpuAnimatedVertexBuffer animatedVertexBuffer = meshPart.VertexBuffer as CpuAnimatedVertexBuffer;
             animatedVertexBuffer.UpdateVertices(boneTransforms, meshPart.VertexOffset, meshPart.NumVertices);
             animatedVertexBuffer.UpdateVertices(boneTransforms, meshPart.VertexOffset, meshPart.NumVertices);
         }
         }
         
         

+ 13 - 13
Animation/ContentReaders/CpuAnimatedVertexBufferReader.cs

@@ -28,29 +28,29 @@ namespace nkast.Aether.Animation.Content
         protected override CpuAnimatedVertexBuffer Read(ContentReader input, CpuAnimatedVertexBuffer buffer)
         protected override CpuAnimatedVertexBuffer Read(ContentReader input, CpuAnimatedVertexBuffer buffer)
         {
         {
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
-            var device = graphicsDeviceService.GraphicsDevice;
+            GraphicsDevice device = graphicsDeviceService.GraphicsDevice;
 
 
             // read standard VertexBuffer
             // read standard VertexBuffer
-            var declaration = input.ReadRawObject<VertexDeclaration>();
-            var vertexCount = (int)input.ReadUInt32();
+            VertexDeclaration declaration = input.ReadRawObject<VertexDeclaration>();
+            int vertexCount = (int)input.ReadUInt32();
             // int dataSize = vertexCount * declaration.VertexStride;
             // int dataSize = vertexCount * declaration.VertexStride;
             //byte[] data = new byte[dataSize];
             //byte[] data = new byte[dataSize];
             //input.Read(data, 0, dataSize);
             //input.Read(data, 0, dataSize);
 
 
             //read data                      
             //read data                      
-            var channels = declaration.GetVertexElements();
+            VertexElement[] channels = declaration.GetVertexElements();
             var cpuVertices = new VertexIndicesWeightsPositionNormal[vertexCount];
             var cpuVertices = new VertexIndicesWeightsPositionNormal[vertexCount];
             var gpuVertices = new VertexPositionNormalTexture[vertexCount];
             var gpuVertices = new VertexPositionNormalTexture[vertexCount];
 
 
             for (int i = 0; i < vertexCount; i++)
             for (int i = 0; i < vertexCount; i++)
             {
             {
-                foreach (var channel in channels)
+                foreach (VertexElement channel in channels)
                 {
                 {
                     switch (channel.VertexElementUsage)
                     switch (channel.VertexElementUsage)
                     {
                     {
                         case VertexElementUsage.Position:
                         case VertexElementUsage.Position:
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector3);
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector3);
-                            var pos = input.ReadVector3();
+                            Vector3 pos = input.ReadVector3();
                             if (channel.UsageIndex == 0)
                             if (channel.UsageIndex == 0)
                             {
                             {
                                 cpuVertices[i].Position = pos;
                                 cpuVertices[i].Position = pos;
@@ -60,7 +60,7 @@ namespace nkast.Aether.Animation.Content
 
 
                         case VertexElementUsage.Normal:
                         case VertexElementUsage.Normal:
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector3);
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector3);
-                            var nor = input.ReadVector3();
+                            Vector3 nor = input.ReadVector3();
                             if (channel.UsageIndex == 0)
                             if (channel.UsageIndex == 0)
                             {
                             {
                                 cpuVertices[i].Normal = nor;
                                 cpuVertices[i].Normal = nor;
@@ -70,7 +70,7 @@ namespace nkast.Aether.Animation.Content
 
 
                         case VertexElementUsage.TextureCoordinate:
                         case VertexElementUsage.TextureCoordinate:
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector2);
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector2);
-                            var tex = input.ReadVector2();
+                            Vector2 tex = input.ReadVector2();
                             if (channel.UsageIndex == 0)
                             if (channel.UsageIndex == 0)
                             {
                             {
                                 gpuVertices[i].TextureCoordinate = tex;
                                 gpuVertices[i].TextureCoordinate = tex;
@@ -79,7 +79,7 @@ namespace nkast.Aether.Animation.Content
 
 
                         case VertexElementUsage.BlendWeight:
                         case VertexElementUsage.BlendWeight:
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector4);
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Vector4);
-                            var wei = input.ReadVector4();
+                            Vector4 wei = input.ReadVector4();
                             if (channel.UsageIndex == 0)
                             if (channel.UsageIndex == 0)
                             {
                             {
                                 cpuVertices[i].BlendWeights = wei;
                                 cpuVertices[i].BlendWeights = wei;
@@ -88,10 +88,10 @@ namespace nkast.Aether.Animation.Content
 
 
                         case VertexElementUsage.BlendIndices:
                         case VertexElementUsage.BlendIndices:
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Byte4);
                             System.Diagnostics.Debug.Assert(channel.VertexElementFormat == VertexElementFormat.Byte4);
-                            var i0 = input.ReadByte();
-                            var i1 = input.ReadByte();
-                            var i2 = input.ReadByte();
-                            var i3 = input.ReadByte();
+                            byte i0 = input.ReadByte();
+                            byte i1 = input.ReadByte();
+                            byte i2 = input.ReadByte();
+                            byte i3 = input.ReadByte();
                             if (channel.UsageIndex == 0)
                             if (channel.UsageIndex == 0)
                             {
                             {
                                 cpuVertices[i].BlendIndex0 = i0;
                                 cpuVertices[i].BlendIndex0 = i0;

+ 8 - 7
Atlas/ContentReaders/TextureAtlasReader.cs

@@ -15,6 +15,7 @@
 #endregion
 #endregion
 
 
 using System;
 using System;
+using System.Reflection;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Content;
 using Microsoft.Xna.Framework.Content;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Graphics;
@@ -27,7 +28,7 @@ namespace nkast.Aether.Graphics.Content
         protected override TextureAtlas Read(ContentReader input, TextureAtlas existingInstance)
         protected override TextureAtlas Read(ContentReader input, TextureAtlas existingInstance)
         {
         {
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
-            var device = graphicsDeviceService.GraphicsDevice;
+            GraphicsDevice device = graphicsDeviceService.GraphicsDevice;
 
 
 
 
             TextureAtlas output = existingInstance ?? new TextureAtlas();
             TextureAtlas output = existingInstance ?? new TextureAtlas();
@@ -36,11 +37,11 @@ namespace nkast.Aether.Graphics.Content
             output.Texture = ReadTexture2D(input, output.Texture);
             output.Texture = ReadTexture2D(input, output.Texture);
 
 
             // read Sprites
             // read Sprites
-            var count = input.ReadInt32();
+            int count = input.ReadInt32();
             for (int i = 0; i < count; i++)
             for (int i = 0; i < count; i++)
             {
             {
-                var name = input.ReadString();
-                var bounds = new Rectangle(input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
+                string name = input.ReadString();
+                Rectangle bounds = new Rectangle(input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
                 output.Sprites[name] = new Sprite(output.Texture, bounds);
                 output.Sprites[name] = new Sprite(output.Texture, bounds);
             }
             }
 
 
@@ -56,9 +57,9 @@ namespace nkast.Aether.Graphics.Content
             }
             }
             catch(NotSupportedException)
             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);
+                Assembly assembly = typeof(ContentTypeReader).Assembly;
+                Type texture2DReaderType = assembly.GetType("Microsoft.Xna.Framework.Content.Texture2DReader");
+                ContentTypeReader texture2DReader = (ContentTypeReader)Activator.CreateInstance(texture2DReaderType, true);
                 output = input.ReadRawObject<Texture2D>(texture2DReader, existingInstance);
                 output = input.ReadRawObject<Texture2D>(texture2DReader, existingInstance);
             }
             }
             
             

+ 5 - 5
Content.Pipeline/AnimationImporters/Processors/AnimationsProcessor.cs

@@ -86,7 +86,7 @@ namespace nkast.Aether.Content.Pipeline.Processors
             List<int> skeletonHierarchy = new List<int>();
             List<int> skeletonHierarchy = new List<int>();
             List<string> boneNames = new List<string>();
             List<string> boneNames = new List<string>();
 
 
-            foreach(var bone in bones)
+            foreach(BoneContent bone in bones)
             {
             {
                 bindPose.Add(bone.Transform);
                 bindPose.Add(bone.Transform);
                 invBindPose.Add(Matrix.Invert(bone.AbsoluteTransform));
                 invBindPose.Add(Matrix.Invert(bone.AbsoluteTransform));
@@ -110,7 +110,7 @@ namespace nkast.Aether.Content.Pipeline.Processors
         {
         {
             for (int i = input.Children.Count - 1; i >= 0; i--)
             for (int i = input.Children.Count - 1; i >= 0; i--)
             {
             {
-                var node = input.Children[i];
+                NodeContent node = input.Children[i];
                 if (node is BoneContent &&
                 if (node is BoneContent &&
                     node.AbsoluteTransform == Matrix.Identity &&
                     node.AbsoluteTransform == Matrix.Identity &&
                     node.Children.Count ==1 &&
                     node.Children.Count ==1 &&
@@ -119,7 +119,7 @@ namespace nkast.Aether.Content.Pipeline.Processors
                     )
                     )
                 {
                 {
                     //dettach real boneRoot
                     //dettach real boneRoot
-                    var realBoneRoot = node.Children[0];
+                    NodeContent realBoneRoot = node.Children[0];
                     node.Children.RemoveAt(0);
                     node.Children.RemoveAt(0);
                     //copy animation from node to boneRoot
                     //copy animation from node to boneRoot
                     foreach (var animation in node.Animations)
                     foreach (var animation in node.Animations)
@@ -411,7 +411,7 @@ namespace nkast.Aether.Content.Pipeline.Processors
                                 
                                 
                 if (boneFrames[b][0].Time != TimeSpan.Zero)
                 if (boneFrames[b][0].Time != TimeSpan.Zero)
                 {
                 {
-                    var keyframe0 = new KeyframeContent(boneFrames[b][0].Bone, TimeSpan.Zero, boneFrames[b][0].Transform);
+                    KeyframeContent keyframe0 = new KeyframeContent(boneFrames[b][0].Bone, TimeSpan.Zero, boneFrames[b][0].Transform);
                     boneFrames[b].Insert(0, keyframe0);
                     boneFrames[b].Insert(0, keyframe0);
                 }
                 }
             }
             }
@@ -526,7 +526,7 @@ namespace nkast.Aether.Content.Pipeline.Processors
         {
         {
             int a = i;
             int a = i;
             int b = i + 1;
             int b = i + 1;
-            var diff = frames[b].Time - frames[a].Time;
+            TimeSpan diff = frames[b].Time - frames[a].Time;
             Matrix mBlend = Matrix.Identity;
             Matrix mBlend = Matrix.Identity;
             if (diff > keySpan)
             if (diff > keySpan)
             {
             {

+ 6 - 6
Content.Pipeline/AnimationImporters/Processors/CpuAnimatedModelProcessor.cs

@@ -83,12 +83,12 @@ namespace nkast.Aether.Content.Pipeline.Processors
 
 
         object IContentProcessor.Process(object input, ContentProcessorContext context)
         object IContentProcessor.Process(object input, ContentProcessorContext context)
         {
         {
-            var model = Process((NodeContent)input, context);
-            var outputModel = new DynamicModelContent(model);
+            ModelContent model = Process((NodeContent)input, context);
+            DynamicModelContent outputModel = new DynamicModelContent(model);
             
             
-            foreach(var mesh in outputModel.Meshes)
+            foreach(DynamicModelMeshContent mesh in outputModel.Meshes)
             {
             {
-                foreach(var part in mesh.MeshParts)
+                foreach(DynamicModelMeshPartContent part in mesh.MeshParts)
                 {
                 {
                     ProcessVertexBuffer(outputModel, context, part);
                     ProcessVertexBuffer(outputModel, context, part);
                     ProcessIndexBuffer(outputModel, context, part);
                     ProcessIndexBuffer(outputModel, context, part);
@@ -96,11 +96,11 @@ namespace nkast.Aether.Content.Pipeline.Processors
             }
             }
 
 
             // import animation
             // import animation
-            var animationProcessor = new AnimationsProcessor();
+            AnimationsProcessor animationProcessor = new AnimationsProcessor();
             animationProcessor.MaxBones = this.MaxBones;
             animationProcessor.MaxBones = this.MaxBones;
             animationProcessor.GenerateKeyframesFrequency = this.GenerateKeyframesFrequency;
             animationProcessor.GenerateKeyframesFrequency = this.GenerateKeyframesFrequency;
             animationProcessor.FixRealBoneRoot = this._fixRealBoneRoot;
             animationProcessor.FixRealBoneRoot = this._fixRealBoneRoot;
-            var animation = animationProcessor.Process((NodeContent)input, context);
+            AnimationsContent animation = animationProcessor.Process((NodeContent)input, context);
             outputModel.Tag = animation;
             outputModel.Tag = animation;
 
 
             //ProcessNode((NodeContent)input);
             //ProcessNode((NodeContent)input);

+ 3 - 2
Content.Pipeline/AnimationImporters/Processors/GpuAnimatedModelProcessor.cs

@@ -19,6 +19,7 @@ using Microsoft.Xna.Framework.Content.Pipeline;
 using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
 using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
 using Microsoft.Xna.Framework.Content.Pipeline.Processors;
 using Microsoft.Xna.Framework.Content.Pipeline.Processors;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Graphics;
+using nkast.Aether.Content.Pipeline.Animation;
 
 
 namespace nkast.Aether.Content.Pipeline.Processors
 namespace nkast.Aether.Content.Pipeline.Processors
 {
 {
@@ -67,11 +68,11 @@ namespace nkast.Aether.Content.Pipeline.Processors
 
 
         public override ModelContent Process(NodeContent input, ContentProcessorContext context)
         public override ModelContent Process(NodeContent input, ContentProcessorContext context)
         {
         {
-            var animationProcessor = new AnimationsProcessor();
+            AnimationsProcessor animationProcessor = new AnimationsProcessor();
             animationProcessor.MaxBones = this.MaxBones;   
             animationProcessor.MaxBones = this.MaxBones;   
             animationProcessor.GenerateKeyframesFrequency = this.GenerateKeyframesFrequency;
             animationProcessor.GenerateKeyframesFrequency = this.GenerateKeyframesFrequency;
             animationProcessor.FixRealBoneRoot = this._fixRealBoneRoot;
             animationProcessor.FixRealBoneRoot = this._fixRealBoneRoot;
-            var animation = animationProcessor.Process(input, context);
+            AnimationsContent animation = animationProcessor.Process(input, context);
             
             
             ModelContent model = base.Process(input, context);
             ModelContent model = base.Process(input, context);
             model.Tag = animation;
             model.Tag = animation;

+ 1 - 1
Content.Pipeline/AnimationImporters/Serialization/AnimationsWriter.cs

@@ -88,7 +88,7 @@ namespace nkast.Aether.Content.Pipeline.Serialization
             
             
             for (int boneIndex = 0; boneIndex < count; boneIndex++)
             for (int boneIndex = 0; boneIndex < count; boneIndex++)
             {
             {
-                var boneName = boneNames[boneIndex];
+                string boneName = boneNames[boneIndex];
                 output.Write(boneName);
                 output.Write(boneName);
             }
             }
 
 

+ 38 - 38
Content.Pipeline/AtlasImporter/AtlasImporter.cs

@@ -52,8 +52,8 @@ namespace nkast.Aether.Content.Pipeline
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             xmlDoc.Load(filename);
             xmlDoc.Load(filename);
 
 
-            var map = xmlDoc.DocumentElement;
-            var orientation = GetAttribute(map, "orientation");
+            XmlElement map = xmlDoc.DocumentElement;
+            string orientation = GetAttribute(map, "orientation");
             if (orientation != "orthogonal")
             if (orientation != "orthogonal")
                 throw new InvalidContentException("Invalid orientation. Only 'orthogonal' is supported for atlases.");
                 throw new InvalidContentException("Invalid orientation. Only 'orthogonal' is supported for atlases.");
             output.Renderorder = GetAttribute(map, "renderorder");
             output.Renderorder = GetAttribute(map, "renderorder");
@@ -69,36 +69,36 @@ namespace nkast.Aether.Content.Pipeline
 
 
             if (tilesetNode.Attributes["source"] != null)
             if (tilesetNode.Attributes["source"] != null)
             {
             {
-                var tsxFilename = tilesetNode.Attributes["source"].Value;
-                var baseDirectory = Path.GetDirectoryName(filename);
+                string tsxFilename = tilesetNode.Attributes["source"].Value;
+                string baseDirectory = Path.GetDirectoryName(filename);
                 tsxFilename = Path.Combine(baseDirectory, tsxFilename);
                 tsxFilename = Path.Combine(baseDirectory, tsxFilename);
 
 
-                var tileset = ImportTSX(tsxFilename, context);
+                TilesetContent tileset = ImportTSX(tsxFilename, context);
                 var sourceSprites = SourceSpritesFromTileset(tileset);
                 var sourceSprites = SourceSpritesFromTileset(tileset);
                 output.SourceSprites.AddRange(sourceSprites);
                 output.SourceSprites.AddRange(sourceSprites);
                 context.AddDependency(tsxFilename);
                 context.AddDependency(tsxFilename);
             }
             }
             else
             else
             {
             {
-                var rootDirectory = Path.GetDirectoryName(filename);
-                var tileset = ImportTileset(tilesetNode, context, rootDirectory);
+                string rootDirectory = Path.GetDirectoryName(filename);
+                TilesetContent tileset = ImportTileset(tilesetNode, context, rootDirectory);
                 var sourceSprites = SourceSpritesFromTileset(tileset);
                 var sourceSprites = SourceSpritesFromTileset(tileset);
                 output.SourceSprites.AddRange(sourceSprites);
                 output.SourceSprites.AddRange(sourceSprites);
             }
             }
 
 
             XmlNode layerNode = map["layer"];
             XmlNode layerNode = map["layer"];
-            var layerColumns = Convert.ToInt32(map.Attributes["width"].Value, CultureInfo.InvariantCulture);
-            var layerRows = Convert.ToInt32(map.Attributes["height"].Value, CultureInfo.InvariantCulture);
+            int layerColumns = Convert.ToInt32(map.Attributes["width"].Value, CultureInfo.InvariantCulture);
+            int layerRows = Convert.ToInt32(map.Attributes["height"].Value, CultureInfo.InvariantCulture);
             output.LayerColumns = layerColumns;
             output.LayerColumns = layerColumns;
             output.LayerRows = layerRows;
             output.LayerRows = layerRows;
 
 
             XmlNode layerDataNode = layerNode["data"];
             XmlNode layerDataNode = layerNode["data"];
-            var encoding = layerDataNode.Attributes["encoding"].Value;
+            string encoding = layerDataNode.Attributes["encoding"].Value;
             if (encoding != "csv")
             if (encoding != "csv")
                 throw new InvalidContentException("Invalid encoding. Only 'csv' is supported for data.");
                 throw new InvalidContentException("Invalid encoding. Only 'csv' is supported for data.");
-            var data = layerDataNode.InnerText;
-            var dataStringList = data.Split(',');
-            var mapData = new int[dataStringList.Length];
+            string data = layerDataNode.InnerText;
+            string[] dataStringList = data.Split(',');
+            int[] mapData = new int[dataStringList.Length];
             for (int i = 0; i < dataStringList.Length; i++)
             for (int i = 0; i < dataStringList.Length; i++)
                 mapData[i] = Convert.ToInt32(dataStringList[i].Trim(), CultureInfo.InvariantCulture);
                 mapData[i] = Convert.ToInt32(dataStringList[i].Trim(), CultureInfo.InvariantCulture);
             output.MapData = mapData;
             output.MapData = mapData;
@@ -111,7 +111,7 @@ namespace nkast.Aether.Content.Pipeline
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             xmlDoc.Load(tsxFilename);
             xmlDoc.Load(tsxFilename);
             XmlNode tilesetNode = xmlDoc.DocumentElement;
             XmlNode tilesetNode = xmlDoc.DocumentElement;
-            var baseDirectory = Path.GetDirectoryName(tsxFilename);
+            string baseDirectory = Path.GetDirectoryName(tsxFilename);
             return ImportTileset(tilesetNode, context, baseDirectory);
             return ImportTileset(tilesetNode, context, baseDirectory);
         }
         }
 
 
@@ -128,27 +128,27 @@ namespace nkast.Aether.Content.Pipeline
             foreach (XmlNode tileNode in tilesetNode.ChildNodes)
             foreach (XmlNode tileNode in tilesetNode.ChildNodes)
             {
             {
                 if (tileNode.Name != "tile") continue;
                 if (tileNode.Name != "tile") continue;
-                var tileId = GetAttributeAsInt(tileNode, "id").Value;
+                int tileId = GetAttributeAsInt(tileNode, "id").Value;
                 
                 
                 XmlNode imageNode = tileNode["image"];
                 XmlNode imageNode = tileNode["image"];
 
 
-                //var format = GetAttribute(imageNode, "format");
-                var imageSource = GetAttribute(imageNode, "source");
-                var fullImageSource = Path.Combine(baseDirectory, imageSource);
+                //string format = GetAttribute(imageNode, "format");
+                string imageSource = GetAttribute(imageNode, "source");
+                string fullImageSource = Path.Combine(baseDirectory, imageSource);
                 TextureImporter txImporter = new TextureImporter();
                 TextureImporter txImporter = new TextureImporter();
-                var textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
+                Texture2DContent textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
 
 
-                var source = new TileContent();
+                TileContent source = new TileContent();
                 source.SrcTexture = textureContent;
                 source.SrcTexture = textureContent;
                 source.SrcBounds.Location = Point.Zero;
                 source.SrcBounds.Location = Point.Zero;
                 source.SrcBounds.Width  = textureContent.Mipmaps[0].Width;
                 source.SrcBounds.Width  = textureContent.Mipmaps[0].Width;
                 source.SrcBounds.Height = textureContent.Mipmaps[0].Height;
                 source.SrcBounds.Height = textureContent.Mipmaps[0].Height;
 
 
-                var transKeyColor = GetAttributeAsColor(imageNode, "trans");
+                Color? transKeyColor = GetAttributeAsColor(imageNode, "trans");
                 if (transKeyColor != null)
                 if (transKeyColor != null)
-                    foreach (var mips in textureContent.Faces)
-                        foreach (var mip in mips)
+                    foreach (MipmapChain mips in textureContent.Faces)
+                        foreach (BitmapContent mip in mips)
                             ((PixelBitmapContent<Color>)mip).ReplaceColor(transKeyColor.Value, Color.Transparent);
                             ((PixelBitmapContent<Color>)mip).ReplaceColor(transKeyColor.Value, Color.Transparent);
 
 
                 if (tileId != tileset.SourceTiles.Count)
                 if (tileId != tileset.SourceTiles.Count)
@@ -164,9 +164,9 @@ namespace nkast.Aether.Content.Pipeline
         {
         {
             List<SpriteContent> sprites = new List<SpriteContent>();
             List<SpriteContent> sprites = new List<SpriteContent>();
 
 
-            foreach (var tile in tileset.SourceTiles)
+            foreach (TileContent tile in tileset.SourceTiles)
             {
             {
-                var sprite = new SpriteContent();
+                SpriteContent sprite = new SpriteContent();
                 sprite.Texture = tile.SrcTexture;
                 sprite.Texture = tile.SrcTexture;
                 sprite.Bounds = tile.SrcBounds;
                 sprite.Bounds = tile.SrcBounds;
                 sprites.Add(sprite);
                 sprites.Add(sprite);
@@ -181,10 +181,10 @@ namespace nkast.Aether.Content.Pipeline
             {
             {
                 for (int x = 0; x < output.LayerColumns; x++)
                 for (int x = 0; x < output.LayerColumns; x++)
                 {
                 {
-                    var posX = x * output.TileWidth;
-                    var posY = y * output.TileHeight;
+                    int posX = x * output.TileWidth;
+                    int posY = y * output.TileHeight;
 
 
-                    var tilegId = output.MapData[y * output.LayerColumns + x];
+                    int tilegId = output.MapData[y * output.LayerColumns + x];
                     if (tilegId == 0) continue;
                     if (tilegId == 0) continue;
                     tilegId -= output.Firstgid;
                     tilegId -= output.Firstgid;
 
 
@@ -195,11 +195,11 @@ namespace nkast.Aether.Content.Pipeline
                     if (output.Renderorder == "right-down" || output.Renderorder == "left-down")
                     if (output.Renderorder == "right-down" || output.Renderorder == "left-down")
                         posY += (output.TileHeight - srcSprite.Bounds.Height);
                         posY += (output.TileHeight - srcSprite.Bounds.Height);
 
 
-                    var newSprite = new SpriteContent(srcSprite);
+                    SpriteContent newSprite = new SpriteContent(srcSprite);
                     newSprite.Bounds.Location = new Point(posX, posY);
                     newSprite.Bounds.Location = new Point(posX, posY);
 
 
                     output.DestinationSprites.Add(newSprite);
                     output.DestinationSprites.Add(newSprite);
-                    var name = srcSprite.Texture.Name;
+                    string name = srcSprite.Texture.Name;
                     output.Sprites.Add(name, newSprite);
                     output.Sprites.Add(name, newSprite);
                 }
                 }
             }
             }
@@ -207,34 +207,34 @@ namespace nkast.Aether.Content.Pipeline
 
 
         private static void RenderAtlas(TextureAtlasContent output)
         private static void RenderAtlas(TextureAtlasContent output)
         {
         {
-            var outputBmp = new PixelBitmapContent<Color>(output.Width, output.Height);
-            foreach (var sprite in output.DestinationSprites)
+            PixelBitmapContent<Color> outputBmp = new PixelBitmapContent<Color>(output.Width, output.Height);
+            foreach (SpriteContent sprite in output.DestinationSprites)
             {
             {
-                var srcBmp = sprite.Texture.Faces[0][0];
-                var srcRect = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
+                BitmapContent srcBmp = sprite.Texture.Faces[0][0];
+                Rectangle srcRect = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
                 BitmapContent.Copy(srcBmp, srcRect, outputBmp, sprite.Bounds);
                 BitmapContent.Copy(srcBmp, srcRect, outputBmp, sprite.Bounds);
             }
             }
-            var mipmapChain = new MipmapChain(outputBmp);
+            MipmapChain mipmapChain = new MipmapChain(outputBmp);
             output.Texture.Mipmaps = mipmapChain;
             output.Texture.Mipmaps = mipmapChain;
         }
         }
         
         
         private static string GetAttribute(XmlNode xmlNode, string attributeName)
         private static string GetAttribute(XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if(attribute==null) return null;
             if(attribute==null) return null;
             return attribute.Value;
             return attribute.Value;
         }
         }
         
         
         private static int? GetAttributeAsInt(XmlNode xmlNode, string attributeName)
         private static int? GetAttributeAsInt(XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             return Int32.Parse(attribute.Value, CultureInfo.InvariantCulture);
             return Int32.Parse(attribute.Value, CultureInfo.InvariantCulture);
         }
         }
 
 
         private static Color? GetAttributeAsColor(XmlNode xmlNode, string attributeName)
         private static Color? GetAttributeAsColor(XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             attribute.Value = attribute.Value.TrimStart(new char[] { '#' });
             attribute.Value = attribute.Value.TrimStart(new char[] { '#' });
             return new Color(
             return new Color(

+ 14 - 14
Content.Pipeline/AtlasImporter/Processors/TextureAtlasProcessor.cs

@@ -60,20 +60,20 @@ namespace nkast.Aether.Content.Pipeline
         public TextureAtlasContent Process(TextureAtlasContent input, ContentProcessorContext context)
         public TextureAtlasContent Process(TextureAtlasContent input, ContentProcessorContext context)
         {
         {
             if (MipmapsPerSprite && GenerateMipmaps)
             if (MipmapsPerSprite && GenerateMipmaps)
-                foreach (var texture in input.SourceSprites)
+                foreach (SpriteContent texture in input.SourceSprites)
                     texture.Texture.GenerateMipmaps(false);
                     texture.Texture.GenerateMipmaps(false);
 
 
-            var output = input;
+            TextureAtlasContent output = input;
             
             
             if (GenerateMipmaps)
             if (GenerateMipmaps)
             {
             {
                 if (MipmapsPerSprite)
                 if (MipmapsPerSprite)
                 {
                 {
-                    var maxSpriteWidth = 1;
-                    var maxSpriteHeight = 1;
-                    foreach (var sprite in input.SourceSprites)
+                    int maxSpriteWidth = 1;
+                    int maxSpriteHeight = 1;
+                    foreach (SpriteContent sprite in input.SourceSprites)
                     {
                     {
-                        var face0 = sprite.Texture.Faces[0];
+                        MipmapChain face0 = sprite.Texture.Faces[0];
                         maxSpriteWidth = Math.Max(maxSpriteWidth, face0[0].Width);
                         maxSpriteWidth = Math.Max(maxSpriteWidth, face0[0].Width);
                         maxSpriteHeight = Math.Max(maxSpriteHeight, face0[0].Height);
                         maxSpriteHeight = Math.Max(maxSpriteHeight, face0[0].Height);
                     }
                     }
@@ -88,12 +88,12 @@ namespace nkast.Aether.Content.Pipeline
                         if ((maxSpriteWidth / mipLevel2) < 1 && (maxSpriteHeight / mipLevel2) < 1) break;
                         if ((maxSpriteWidth / mipLevel2) < 1 && (maxSpriteHeight / mipLevel2) < 1) break;
 
 
                         var mipmapBmp = new PixelBitmapContent<Color>(size.Width, size.Height);
                         var mipmapBmp = new PixelBitmapContent<Color>(size.Width, size.Height);
-                        foreach (var sprite in input.DestinationSprites)
+                        foreach (SpriteContent sprite in input.DestinationSprites)
                         {
                         {
                             if (mipLevel >= sprite.Texture.Faces[0].Count) continue;
                             if (mipLevel >= sprite.Texture.Faces[0].Count) continue;
-                            var srcBmp = sprite.Texture.Faces[0][mipLevel];
-                            var srcRect = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
-                            var destRect = sprite.Bounds;
+                            BitmapContent srcBmp = sprite.Texture.Faces[0][mipLevel];
+                            Rectangle srcRect = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
+                            Rectangle destRect = sprite.Bounds;
                             destRect.X = (int)Math.Ceiling((float)destRect.X / mipLevel2);
                             destRect.X = (int)Math.Ceiling((float)destRect.X / mipLevel2);
                             destRect.Y = (int)Math.Ceiling((float)destRect.Y / mipLevel2);
                             destRect.Y = (int)Math.Ceiling((float)destRect.Y / mipLevel2);
                             destRect.Width = (int)(destRect.Width / mipLevel2);
                             destRect.Width = (int)(destRect.Width / mipLevel2);
@@ -104,12 +104,12 @@ namespace nkast.Aether.Content.Pipeline
                         output.Texture.Mipmaps.Add(mipmapBmp);
                         output.Texture.Mipmaps.Add(mipmapBmp);
                     }
                     }
 
 
-                    var outputFace0 = output.Texture.Faces[0];
+                    MipmapChain outputFace0 = output.Texture.Faces[0];
                     while (outputFace0[outputFace0.Count - 1].Width > 1 || outputFace0[outputFace0.Count - 1].Height > 1)
                     while (outputFace0[outputFace0.Count - 1].Width > 1 || outputFace0[outputFace0.Count - 1].Height > 1)
                     {
                     {
-                        var lastMipmap = outputFace0[outputFace0.Count - 1];
-                        var w = Math.Max(1, lastMipmap.Width/2);
-                        var h = Math.Max(1, lastMipmap.Height/2);
+                        BitmapContent lastMipmap = outputFace0[outputFace0.Count - 1];
+                        int w = Math.Max(1, lastMipmap.Width/2);
+                        int h = Math.Max(1, lastMipmap.Height/2);
                         var mipmapBmp = new PixelBitmapContent<Color>(w, h);
                         var mipmapBmp = new PixelBitmapContent<Color>(w, h);
                         //PixelBitmapContent<Color>.Copy(lastMipmap, mipmapBmp);
                         //PixelBitmapContent<Color>.Copy(lastMipmap, mipmapBmp);
                         output.Texture.Mipmaps.Add(mipmapBmp);
                         output.Texture.Mipmaps.Add(mipmapBmp);

+ 2 - 2
Content.Pipeline/AtlasImporter/Serialization/TextureAtlasWriter.cs

@@ -31,9 +31,9 @@ namespace nkast.Aether.Content.Pipeline.Serialization
             
             
             // write Sprites
             // write Sprites
             output.Write(atlas.DestinationSprites.Count);
             output.Write(atlas.DestinationSprites.Count);
-            foreach(var name in atlas.Sprites.Keys)
+            foreach(string name in atlas.Sprites.Keys)
             {
             {
-                var sprite = atlas.Sprites[name];
+                SpriteContent sprite = atlas.Sprites[name];
                 output.Write(name);
                 output.Write(name);
                 output.Write(sprite.Bounds.X);
                 output.Write(sprite.Bounds.X);
                 output.Write(sprite.Bounds.Y);
                 output.Write(sprite.Bounds.Y);

+ 8 - 8
Content.Pipeline/DDSImporter/DDSImporter.cs

@@ -29,11 +29,11 @@ namespace nkast.Aether.Content.Pipeline
         {
         {
             TextureContent output;
             TextureContent output;
 
 
-            using(var stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
+            using(Stream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
             {
             {
-                using(var reader = new BinaryReader(stream))
+                using(BinaryReader reader = new BinaryReader(stream))
                 {
                 {
-                    var header = new DDSHeader(reader);
+                    DDSHeader header = new DDSHeader(reader);
                     if (header.PixelFormat.Flags == PF_Flags.FOURCC && header.PixelFormat.FourCC == PF_FourCC.DX10)
                     if (header.PixelFormat.Flags == PF_Flags.FOURCC && header.PixelFormat.FourCC == PF_FourCC.DX10)
                     {
                     {
                         throw new NotImplementedException("DX10 Header not supported");
                         throw new NotImplementedException("DX10 Header not supported");
@@ -44,14 +44,14 @@ namespace nkast.Aether.Content.Pipeline
 
 
                     if (header.Caps2.HasFlag(DDS_Caps2.CUBEMAP))
                     if (header.Caps2.HasFlag(DDS_Caps2.CUBEMAP))
                     {
                     {
-                        var cube = new TextureCubeContent();
-                        var format = GetFormat(header.PixelFormat);
+                        TextureCubeContent cube = new TextureCubeContent();
+                        SurfaceFormat format = GetFormat(header.PixelFormat);
                         for (int f = 0; f < 6; f++)
                         for (int f = 0; f < 6; f++)
                         {
                         {
-                            var width = header.Width;
-                            var height = header.Height;
+                            int width = header.Width;
+                            int height = header.Height;
                             BitmapContent bitmap = CreateBitmap(format, width, height);
                             BitmapContent bitmap = CreateBitmap(format, width, height);
-                            var size = GetBitmapSize(format, width, height);
+                            int size = GetBitmapSize(format, width, height);
                             byte[] src = reader.ReadBytes(size);
                             byte[] src = reader.ReadBytes(size);
                             bitmap.SetPixelData(src);
                             bitmap.SetPixelData(src);
                             cube.Faces[f].Add(bitmap);
                             cube.Faces[f].Add(bitmap);

+ 6 - 6
Content.Pipeline/DDSImporter/DDSProcessor.cs

@@ -59,7 +59,7 @@ namespace nkast.Aether.Content.Pipeline
 
 
         private void ConvertToColor(TextureContent textureContent)
         private void ConvertToColor(TextureContent textureContent)
         {
         {
-            foreach (var face in textureContent.Faces)
+            foreach (MipmapChain face in textureContent.Faces)
             {
             {
                 for (int m = 0; m < face.Count; m++)
                 for (int m = 0; m < face.Count; m++)
                 {
                 {
@@ -73,14 +73,14 @@ namespace nkast.Aether.Content.Pipeline
 
 
         unsafe private static BitmapContent ConvertToColor(BitmapContent input)
         unsafe private static BitmapContent ConvertToColor(BitmapContent input)
         {
         {
-            var width = input.Width;
-            var height = input.Height;
+            int width = input.Width;
+            int height = input.Height;
 
 
             SurfaceFormat format;
             SurfaceFormat format;
             input.TryGetFormat(out format);
             input.TryGetFormat(out format);
-            var formatSize = DDSImporter.GetBitmapSize(format, width, height);
-            var blocks = formatSize;
-            var inData = input.GetPixelData();
+            int formatSize = DDSImporter.GetBitmapSize(format, width, height);
+            int blocks = formatSize;
+            byte[] inData = input.GetPixelData();
 
 
             var output = new PixelBitmapContent<Color>(width, height);
             var output = new PixelBitmapContent<Color>(width, height);
 
 

+ 2 - 2
Content.Pipeline/DDSImporter/DXT1Block.cs

@@ -34,8 +34,8 @@ namespace nkast.Aether.Content.Pipeline
         
         
         internal Color GetColor(int colorIndex)
         internal Color GetColor(int colorIndex)
         {
         {
-            var H = colorIndex / 4;
-            var L = colorIndex % 4;
+            int H = colorIndex / 4;
+            int L = colorIndex % 4;
             int idx = 0;
             int idx = 0;
 
 
             switch (H)
             switch (H)

+ 1 - 1
Content.Pipeline/GraphicsImporters/Graphics/DynamicModelContent.cs

@@ -71,7 +71,7 @@ namespace nkast.Aether.Content.Pipeline.Graphics
 
 
             //deep clone Meshes
             //deep clone Meshes
             Meshes = new List<DynamicModelMeshContent>(source.Meshes.Count);
             Meshes = new List<DynamicModelMeshContent>(source.Meshes.Count);
-            foreach(var mesh in source.Meshes)
+            foreach(ModelMeshContent mesh in source.Meshes)
                 Meshes.Add(new DynamicModelMeshContent(mesh));
                 Meshes.Add(new DynamicModelMeshContent(mesh));
         }
         }
 
 

+ 1 - 1
Content.Pipeline/GraphicsImporters/Graphics/DynamicModelMeshContent.cs

@@ -55,7 +55,7 @@ namespace nkast.Aether.Content.Pipeline.Graphics
             
             
             //deep clone MeshParts
             //deep clone MeshParts
             MeshParts = new List<DynamicModelMeshPartContent>(source.MeshParts.Count);
             MeshParts = new List<DynamicModelMeshPartContent>(source.MeshParts.Count);
-            foreach (var mesh in source.MeshParts)
+            foreach (ModelMeshPartContent mesh in source.MeshParts)
                 MeshParts.Add(new DynamicModelMeshPartContent(mesh));
                 MeshParts.Add(new DynamicModelMeshPartContent(mesh));
         }
         }
 
 

+ 4 - 4
Content.Pipeline/GraphicsImporters/Processors/DynamicModelProcessor.cs

@@ -62,12 +62,12 @@ namespace nkast.Aether.Content.Pipeline.Serialization
 
 
         object IContentProcessor.Process(object input, ContentProcessorContext context)
         object IContentProcessor.Process(object input, ContentProcessorContext context)
         {
         {
-            var model = Process((NodeContent)input, context);
-            var dynamicModel = new DynamicModelContent(model);
+            ModelContent model = Process((NodeContent)input, context);
+            DynamicModelContent dynamicModel = new DynamicModelContent(model);
             
             
-            foreach(var mesh in dynamicModel.Meshes)
+            foreach(DynamicModelMeshContent mesh in dynamicModel.Meshes)
             {
             {
-                foreach(var part in mesh.MeshParts)
+                foreach(DynamicModelMeshPartContent part in mesh.MeshParts)
                 {
                 {
                     ProcessVertexBuffer(dynamicModel, context, part);
                     ProcessVertexBuffer(dynamicModel, context, part);
                     ProcessIndexBuffer(dynamicModel, context, part);
                     ProcessIndexBuffer(dynamicModel, context, part);

+ 5 - 5
Content.Pipeline/GraphicsImporters/Serialization/DynamicIndexBufferWriter.cs

@@ -36,8 +36,8 @@ namespace nkast.Aether.Content.Pipeline.Serialization
         private static void WriteIndexBuffer(ContentWriter output, DynamicIndexBufferContent buffer)
         private static void WriteIndexBuffer(ContentWriter output, DynamicIndexBufferContent buffer)
         {
         {
             // check if the buffer contains values greater than UInt16.MaxValue
             // check if the buffer contains values greater than UInt16.MaxValue
-            var is16Bit = true;
-            foreach(var index in buffer)
+            bool is16Bit = true;
+            foreach(int index in buffer)
             {
             {
                 if(index > UInt16.MaxValue)
                 if(index > UInt16.MaxValue)
                 {
                 {
@@ -46,18 +46,18 @@ namespace nkast.Aether.Content.Pipeline.Serialization
                 }
                 }
             }
             }
             
             
-           var stride  = (is16Bit) ? 2 : 4;
+           int stride  = (is16Bit) ? 2 : 4;
 
 
             output.Write(is16Bit); // Is 16 bit
             output.Write(is16Bit); // Is 16 bit
             output.Write((UInt32)(buffer.Count*stride)); // Data size
             output.Write((UInt32)(buffer.Count*stride)); // Data size
             if (is16Bit)
             if (is16Bit)
             {
             {
-	            foreach (var item in buffer)
+	            foreach (int item in buffer)
 	                output.Write((UInt16)item);
 	                output.Write((UInt16)item);
             }
             }
             else
             else
             {
             {
-	            foreach (var item in buffer)
+	            foreach (int item in buffer)
 	                output.Write(item);
 	                output.Write(item);
             }
             }
         }
         }

+ 7 - 7
Content.Pipeline/GraphicsImporters/Serialization/DynamicModelWriter.cs

@@ -43,21 +43,21 @@ namespace nkast.Aether.Content.Pipeline.Serialization
 
 
         private void WriteBones(ContentWriter output, ModelBoneContentCollection bones)
         private void WriteBones(ContentWriter output, ModelBoneContentCollection bones)
         {
         {
-            var bonesCount = bones.Count;
+            int bonesCount = bones.Count;
             output.Write((UInt32)bonesCount);
             output.Write((UInt32)bonesCount);
 
 
-            foreach (var bone in bones)
+            foreach (ModelBoneContent bone in bones)
             {
             {
                 output.WriteObject(bone.Name);
                 output.WriteObject(bone.Name);
                 output.Write(bone.Transform);
                 output.Write(bone.Transform);
             }
             }
 
 
-            foreach (var bone in bones)
+            foreach (ModelBoneContent bone in bones)
             {
             {
                 WriteBoneReference(output, bonesCount, bone.Parent);
                 WriteBoneReference(output, bonesCount, bone.Parent);
                 
                 
                 output.Write((uint)bone.Children.Count);
                 output.Write((uint)bone.Children.Count);
-                foreach (var child in bone.Children)
+                foreach (ModelBoneContent child in bone.Children)
                     WriteBoneReference(output, bonesCount, child);
                     WriteBoneReference(output, bonesCount, child);
             }
             }
 
 
@@ -81,8 +81,8 @@ namespace nkast.Aether.Content.Pipeline.Serialization
         {
         {
             output.Write((UInt32)meshes.Count);
             output.Write((UInt32)meshes.Count);
 
 
-            var bonesCount = model.Bones.Count;
-            foreach (var mesh in meshes)
+            int bonesCount = model.Bones.Count;
+            foreach (DynamicModelMeshContent mesh in meshes)
             {
             {
                 output.WriteObject(mesh.Name); 
                 output.WriteObject(mesh.Name); 
                 WriteBoneReference(output, bonesCount, mesh.ParentBone);
                 WriteBoneReference(output, bonesCount, mesh.ParentBone);
@@ -105,7 +105,7 @@ namespace nkast.Aether.Content.Pipeline.Serialization
         {
         {
             output.Write((UInt32)parts.Count);
             output.Write((UInt32)parts.Count);
 
 
-            foreach (var part in parts)
+            foreach (DynamicModelMeshPartContent part in parts)
             {
             {
                 output.Write((UInt32)part.VertexOffset);
                 output.Write((UInt32)part.VertexOffset);
                 output.Write((UInt32)part.NumVertices);
                 output.Write((UInt32)part.NumVertices);

+ 3 - 3
Content.Pipeline/RawModelProcessor/RawModelProcessor.cs

@@ -27,8 +27,8 @@ namespace nkast.Aether.Content.Pipeline
         {
         {
             ModelContent model = base.Process(input, context);
             ModelContent model = base.Process(input, context);
 
 
-            foreach(var mesh in model.Meshes)
-                foreach(var part in mesh.MeshParts)
+            foreach(ModelMeshContent mesh in model.Meshes)
+                foreach(ModelMeshPartContent part in mesh.MeshParts)
                     Proccess(part);
                     Proccess(part);
 
 
             return model;
             return model;
@@ -36,7 +36,7 @@ namespace nkast.Aether.Content.Pipeline
 
 
         private void Proccess(ModelMeshPartContent part)
         private void Proccess(ModelMeshPartContent part)
         {
         {
-            var vertexData = part.VertexBuffer.VertexData;
+            byte[] vertexData = part.VertexBuffer.VertexData;
 
 
             object indexData;
             object indexData;
             int indexSize = part.IndexBuffer.Count;
             int indexSize = part.IndexBuffer.Count;

+ 13 - 13
Content.Pipeline/SLMCImporter/SLMCImporter.cs

@@ -36,7 +36,7 @@ namespace nkast.Aether.Content.Pipeline
             if (Path.GetExtension(filename) != ".slmc")
             if (Path.GetExtension(filename) != ".slmc")
                 throw new InvalidContentException("File type not supported.");
                 throw new InvalidContentException("File type not supported.");
 
 
-            var images = ImportSLMC(filename, context);
+            IList<Texture2DContent> images = ImportSLMC(filename, context);
 
 
             if (images.Count < 1)
             if (images.Count < 1)
                 throw new InvalidContentException("Element 'channels' must have at least one 'image'.");
                 throw new InvalidContentException("Element 'channels' must have at least one 'image'.");
@@ -46,21 +46,21 @@ namespace nkast.Aether.Content.Pipeline
             int width = images[0].Mipmaps[0].Width;
             int width = images[0].Mipmaps[0].Width;
             int height = images[0].Mipmaps[0].Height;
             int height = images[0].Mipmaps[0].Height;
             // validate size
             // validate size
-            foreach (var image in images)
+            foreach (Texture2DContent image in images)
             {
             {
                 if (image.Mipmaps[0].Width != width|| image.Mipmaps[0].Height != height)
                 if (image.Mipmaps[0].Width != width|| image.Mipmaps[0].Height != height)
                     throw new InvalidContentException("Images must be of the same size.");
                     throw new InvalidContentException("Images must be of the same size.");
             }
             }
 
 
-            var pixelCount = width * height;
-            var byteCount = pixelCount * 4;
+            int pixelCount = width * height;
+            int byteCount = pixelCount * 4;
             byte[] data = new byte[byteCount];
             byte[] data = new byte[byteCount];
 
 
             for (int i = 0; i < images.Count; i++)
             for (int i = 0; i < images.Count; i++)
             {
             {
-                var image = images[i];
-                var face = image.Faces[0][0];
-                var pixelData = face.GetPixelData();
+                Texture2DContent image = images[i];
+                BitmapContent face = image.Faces[0][0];
+                byte[] pixelData = face.GetPixelData();
 
 
                 for (int d = 0; d < pixelCount; d++)
                 for (int d = 0; d < pixelCount; d++)
                 {
                 {
@@ -68,7 +68,7 @@ namespace nkast.Aether.Content.Pipeline
                 }
                 }
             }
             }
 
 
-            var bitmap = new PixelBitmapContent<Color>(width, height);
+            PixelBitmapContent<Color> bitmap = new PixelBitmapContent<Color>(width, height);
             bitmap.SetPixelData(data);
             bitmap.SetPixelData(data);
 
 
             output = new Texture2DContent();
             output = new Texture2DContent();
@@ -82,7 +82,7 @@ namespace nkast.Aether.Content.Pipeline
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             xmlDoc.Load(filename);
             xmlDoc.Load(filename);
             
             
-            var channels = xmlDoc.DocumentElement;
+            XmlElement channels = xmlDoc.DocumentElement;
 
 
             if (channels.Name != "channels")
             if (channels.Name != "channels")
                 throw new InvalidContentException(String.Format("Root element must be 'channels'."));
                 throw new InvalidContentException(String.Format("Root element must be 'channels'."));
@@ -95,10 +95,10 @@ namespace nkast.Aether.Content.Pipeline
                 if (imageNode.Name != "image")
                 if (imageNode.Name != "image")
                     throw new InvalidContentException(String.Format("Element '{0}' not supported in 'channels'.", imageNode.Name));
                     throw new InvalidContentException(String.Format("Element '{0}' not supported in 'channels'.", imageNode.Name));
 
 
-                var imageSource = GetAttribute(imageNode, "source");
-                var fullImageSource = Path.Combine(Path.GetDirectoryName(filename), imageSource);
+                string imageSource = GetAttribute(imageNode, "source");
+                string fullImageSource = Path.Combine(Path.GetDirectoryName(filename), imageSource);
                 context.AddDependency(fullImageSource);
                 context.AddDependency(fullImageSource);
-                var textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
+                Texture2DContent textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
 
 
                 images.Add(textureContent);
                 images.Add(textureContent);
@@ -109,7 +109,7 @@ namespace nkast.Aether.Content.Pipeline
         
         
         private static string GetAttribute(XmlNode xmlNode, string attributeName)
         private static string GetAttribute(XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             return attribute.Value;
             return attribute.Value;
         }
         }

+ 9 - 9
Content.Pipeline/TilemapImporters/Processors/TilePacker.cs

@@ -26,18 +26,18 @@ namespace nkast.Aether.Content.Pipeline
             int tileWidth, int tileHeight,
             int tileWidth, int tileHeight,
             bool requirePOT, bool requireSquare)
             bool requirePOT, bool requireSquare)
 		{
 		{
-            // copy tiles to destTiles
-            var destTiles = new List<TileContent>();
+			// copy tiles to destTiles
+			List<TileContent> destTiles = new List<TileContent>();
             for (int i = 0; i < sourceTiles.Count; i++)
             for (int i = 0; i < sourceTiles.Count; i++)
             {
             {
-                var srcTile = sourceTiles[i];
-                var dstTile = new TileContent(srcTile);
+				TileContent srcTile = sourceTiles[i];
+				TileContent dstTile = new TileContent(srcTile);
                 destTiles.Add(dstTile);
                 destTiles.Add(dstTile);
             }
             }
             
             
             for (int i = 0; i < destTiles.Count; i++)
             for (int i = 0; i < destTiles.Count; i++)
 			{
 			{
-                var dstTile = destTiles[i];
+				TileContent dstTile = destTiles[i];
                 dstTile.DstBounds.Width = tileWidth;
                 dstTile.DstBounds.Width = tileWidth;
                 dstTile.DstBounds.Height = tileHeight;
                 dstTile.DstBounds.Height = tileHeight;
             }
             }
@@ -102,11 +102,11 @@ namespace nkast.Aether.Content.Pipeline
 		// Checks if a proposed glyph position collides with anything that we already arranged.
 		// Checks if a proposed glyph position collides with anything that we already arranged.
 		static int FindIntersectingTile(List<TileContent> glyphs, int index, int x, int y)
 		static int FindIntersectingTile(List<TileContent> glyphs, int index, int x, int y)
 		{
 		{
-            var bounds = glyphs[index].DstBounds;
+            Rectangle bounds = glyphs[index].DstBounds;
 
 
 			for (int i = 0; i < index; i++)
 			for (int i = 0; i < index; i++)
 			{
 			{
-                var other = glyphs[i].DstBounds;
+				Rectangle other = glyphs[i].DstBounds;
 
 
                 if (other.X >= x + bounds.Width)
                 if (other.X >= x + bounds.Width)
 					continue;
 					continue;
@@ -125,7 +125,7 @@ namespace nkast.Aether.Content.Pipeline
 
 
 		static int CompareTileSizes(TileContent a, TileContent b)
 		static int CompareTileSizes(TileContent a, TileContent b)
 		{
 		{
-			var res = b.DstBounds.Height.CompareTo(a.DstBounds.Height);
+			int res = b.DstBounds.Height.CompareTo(a.DstBounds.Height);
             if (res == 0)
             if (res == 0)
                 res = b.DstBounds.Width.CompareTo(a.DstBounds.Width);
                 res = b.DstBounds.Width.CompareTo(a.DstBounds.Width);
   		    return res;
   		    return res;
@@ -136,7 +136,7 @@ namespace nkast.Aether.Content.Pipeline
 			int maxWidth = 0;
 			int maxWidth = 0;
 			int totalSize = 0;
 			int totalSize = 0;
 
 
-			foreach (var sourceGlyph in sourceGlyphs)
+			foreach (TileContent sourceGlyph in sourceGlyphs)
 			{
 			{
 				maxWidth = Math.Max(maxWidth, sourceGlyph.DstBounds.Width);
 				maxWidth = Math.Max(maxWidth, sourceGlyph.DstBounds.Width);
 				totalSize += sourceGlyph.DstBounds.Width * sourceGlyph.DstBounds.Height;
 				totalSize += sourceGlyph.DstBounds.Width * sourceGlyph.DstBounds.Height;

+ 13 - 13
Content.Pipeline/TilemapImporters/Processors/TilemapProcessor.cs

@@ -60,18 +60,18 @@ namespace nkast.Aether.Content.Pipeline
         public TilemapContent Process(TilemapContent input, ContentProcessorContext context)
         public TilemapContent Process(TilemapContent input, ContentProcessorContext context)
         {
         {
             if (MipmapsPerSprite && GenerateMipmaps)
             if (MipmapsPerSprite && GenerateMipmaps)
-                foreach (var texture in input.DestinationTiles)
+                foreach (TileContent texture in input.DestinationTiles)
                     texture.SrcTexture.GenerateMipmaps(false);
                     texture.SrcTexture.GenerateMipmaps(false);
 
 
-            var output = input;
+            TilemapContent output = input;
             
             
             if (GenerateMipmaps)
             if (GenerateMipmaps)
             {
             {
                 if (MipmapsPerSprite)
                 if (MipmapsPerSprite)
                 {
                 {
-                    var maxTileWidth = 1;
-                    var maxTileHeight = 1;
-                    foreach (var tile in input.DestinationTiles)
+                    int maxTileWidth = 1;
+                    int maxTileHeight = 1;
+                    foreach (TileContent tile in input.DestinationTiles)
                     {
                     {
                         maxTileWidth = Math.Max(maxTileWidth, tile.DstBounds.Width);
                         maxTileWidth = Math.Max(maxTileWidth, tile.DstBounds.Width);
                         maxTileHeight = Math.Max(maxTileHeight, tile.DstBounds.Height);
                         maxTileHeight = Math.Max(maxTileHeight, tile.DstBounds.Height);
@@ -88,12 +88,12 @@ namespace nkast.Aether.Content.Pipeline
                             break;
                             break;
 
 
                         var mipmapBmp = new PixelBitmapContent<Color>(size.Width, size.Height);
                         var mipmapBmp = new PixelBitmapContent<Color>(size.Width, size.Height);
-                        foreach (var tile in input.DestinationTiles)
+                        foreach (TileContent tile in input.DestinationTiles)
                         {
                         {
                             if (mipLevel >= tile.SrcTexture.Faces[0].Count) continue;
                             if (mipLevel >= tile.SrcTexture.Faces[0].Count) continue;
-                            var srcBmp = tile.SrcTexture.Faces[0][mipLevel];
-                            var srcBounds = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
-                            var dstBounds = tile.DstBounds;
+                            BitmapContent srcBmp = tile.SrcTexture.Faces[0][mipLevel];
+                            Rectangle srcBounds = new Rectangle(0, 0, srcBmp.Width, srcBmp.Height);
+                            Rectangle dstBounds = tile.DstBounds;
                             dstBounds.X = (int)Math.Ceiling((float)dstBounds.X / mipLevel2);
                             dstBounds.X = (int)Math.Ceiling((float)dstBounds.X / mipLevel2);
                             dstBounds.Y = (int)Math.Ceiling((float)dstBounds.Y / mipLevel2);
                             dstBounds.Y = (int)Math.Ceiling((float)dstBounds.Y / mipLevel2);
                             dstBounds.Width = (int)(dstBounds.Width / mipLevel2);
                             dstBounds.Width = (int)(dstBounds.Width / mipLevel2);
@@ -112,12 +112,12 @@ namespace nkast.Aether.Content.Pipeline
                         output.TextureAtlas.Mipmaps.Add(mipmapBmp);
                         output.TextureAtlas.Mipmaps.Add(mipmapBmp);
                     }
                     }
 
 
-                    var outputFace0 = output.TextureAtlas.Faces[0];
+                    MipmapChain outputFace0 = output.TextureAtlas.Faces[0];
                     while (outputFace0[outputFace0.Count - 1].Width > 1 || outputFace0[outputFace0.Count - 1].Height > 1)
                     while (outputFace0[outputFace0.Count - 1].Width > 1 || outputFace0[outputFace0.Count - 1].Height > 1)
                     {
                     {
-                        var lastMipmap = outputFace0[outputFace0.Count - 1];
-                        var w = Math.Max(1, lastMipmap.Width/2);
-                        var h = Math.Max(1, lastMipmap.Height/2);
+                        BitmapContent lastMipmap = outputFace0[outputFace0.Count - 1];
+                        int w = Math.Max(1, lastMipmap.Width/2);
+                        int h = Math.Max(1, lastMipmap.Height/2);
                         var mipmapBmp = new PixelBitmapContent<Color>(w, h);
                         var mipmapBmp = new PixelBitmapContent<Color>(w, h);
                         //PixelBitmapContent<Color>.Copy(lastMipmap, mipmapBmp);
                         //PixelBitmapContent<Color>.Copy(lastMipmap, mipmapBmp);
                         output.TextureAtlas.Mipmaps.Add(mipmapBmp);
                         output.TextureAtlas.Mipmaps.Add(mipmapBmp);

+ 2 - 2
Content.Pipeline/TilemapImporters/Serialization/TilemapWriter.cs

@@ -33,9 +33,9 @@ namespace nkast.Aether.Content.Pipeline.Serialization
 
 
             // write Sprites
             // write Sprites
             output.Write(atlas.DestinationTiles.Count);
             output.Write(atlas.DestinationTiles.Count);
-            foreach(var name in atlas.Tiles.Keys)
+            foreach(string name in atlas.Tiles.Keys)
             {
             {
-                var sprite = atlas.Tiles[name];
+                TileContent sprite = atlas.Tiles[name];
                 output.Write(name);
                 output.Write(name);
                 output.Write(sprite.DstBounds.X);
                 output.Write(sprite.DstBounds.X);
                 output.Write(sprite.DstBounds.Y);
                 output.Write(sprite.DstBounds.Y);

+ 14 - 14
Content.Pipeline/TilemapImporters/Tilemap/TilemapContent.cs

@@ -44,12 +44,12 @@ namespace nkast.Aether.Content.Pipeline
 
 
         internal static void PackTiles(TilemapContent output, int tileWidth, int tileHeight)
         internal static void PackTiles(TilemapContent output, int tileWidth, int tileHeight)
         {
         {
-            var dstTiles = TilePacker.ArrangeGlyphs(output.Tileset.SourceTiles, tileWidth, tileHeight, true, true);
+            IList<TileContent> dstTiles = TilePacker.ArrangeGlyphs(output.Tileset.SourceTiles, tileWidth, tileHeight, true, true);
 
 
-            foreach (var dstTile in dstTiles)
+            foreach (TileContent dstTile in dstTiles)
             {
             {
                 output.DestinationTiles.Add(dstTile);
                 output.DestinationTiles.Add(dstTile);
-                var name = dstTile.SrcTexture.Name;
+                string name = dstTile.SrcTexture.Name;
                 if (output.Tiles.ContainsKey(name))
                 if (output.Tiles.ContainsKey(name))
                     name = name + dstTile.Id;
                     name = name + dstTile.Id;
                 output.Tiles.Add(name, dstTile);
                 output.Tiles.Add(name, dstTile);
@@ -59,36 +59,36 @@ namespace nkast.Aether.Content.Pipeline
         internal static void RenderAtlas(TilemapContent output)
         internal static void RenderAtlas(TilemapContent output)
         {
         {
             Rectangle s = new Rectangle(0,0,1,1);
             Rectangle s = new Rectangle(0,0,1,1);
-            foreach (var dstTile in output.DestinationTiles)
+            foreach (TileContent dstTile in output.DestinationTiles)
             {
             {
                 s = Rectangle.Union(s,dstTile.DstBounds);
                 s = Rectangle.Union(s,dstTile.DstBounds);
             }
             }
 
 
             var outputBmp = new PixelBitmapContent<Color>(s.Width, s.Height);
             var outputBmp = new PixelBitmapContent<Color>(s.Width, s.Height);
 
 
-            foreach (var dstTile in output.DestinationTiles)
+            foreach (TileContent dstTile in output.DestinationTiles)
             {
             {
-                var srcBounds = dstTile.SrcBounds;
-                var dstBounds = new Rectangle(dstTile.DstBounds.X, dstTile.DstBounds.Y, srcBounds.Width, srcBounds.Height);
-                var offsetX = 0;
-                var offsetY = dstTile.DstBounds.Height - srcBounds.Height;
+                Rectangle srcBounds = dstTile.SrcBounds;
+                Rectangle dstBounds = new Rectangle(dstTile.DstBounds.X, dstTile.DstBounds.Y, srcBounds.Width, srcBounds.Height);
+                int offsetX = 0;
+                int offsetY = dstTile.DstBounds.Height - srcBounds.Height;
                 dstBounds.X += offsetX;
                 dstBounds.X += offsetX;
                 dstBounds.Y += offsetY;
                 dstBounds.Y += offsetY;
-                var srcBmp = dstTile.SrcTexture.Faces[0][0];
+                BitmapContent srcBmp = dstTile.SrcTexture.Faces[0][0];
                 BitmapContent.Copy(srcBmp, srcBounds, outputBmp, dstBounds);
                 BitmapContent.Copy(srcBmp, srcBounds, outputBmp, dstBounds);
             }
             }
-            var mipmapChain = new MipmapChain(outputBmp);
+            MipmapChain mipmapChain = new MipmapChain(outputBmp);
             output.TextureAtlas.Mipmaps = mipmapChain;
             output.TextureAtlas.Mipmaps = mipmapChain;
         }
         }
 
 
         internal static void RenderMap(TilemapContent output)
         internal static void RenderMap(TilemapContent output)
         {
         {
-            var mp = new byte[output.MapData.Length * 4];
+            byte[] mp = new byte[output.MapData.Length * 4];
             for (int i = 0; i < output.MapData.Length; i++)
             for (int i = 0; i < output.MapData.Length; i++)
             {
             {
-                var id = output.MapData[i] - output.Firstgid;
+                int id = output.MapData[i] - output.Firstgid;
                 TileContent tile = null;
                 TileContent tile = null;
-                foreach (var t in output.DestinationTiles)
+                foreach (TileContent t in output.DestinationTiles)
                 {
                 {
                     if (t.Id == id)
                     if (t.Id == id)
                     {
                     {

+ 3 - 3
Content.Pipeline/TilemapImporters/Tilemap/XMLExtensions.cs

@@ -24,21 +24,21 @@ namespace System.Xml
 
 
         public static string GetAttribute(this XmlNode xmlNode, string attributeName)
         public static string GetAttribute(this XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             return attribute.Value;
             return attribute.Value;
         }
         }
 
 
         public static int? GetAttributeAsInt(this XmlNode xmlNode, string attributeName)
         public static int? GetAttributeAsInt(this XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             return Int32.Parse(attribute.Value, CultureInfo.InvariantCulture);
             return Int32.Parse(attribute.Value, CultureInfo.InvariantCulture);
         }
         }
 
 
         public static Color? GetAttributeAsColor(this XmlNode xmlNode, string attributeName)
         public static Color? GetAttributeAsColor(this XmlNode xmlNode, string attributeName)
         {
         {
-            var attribute = xmlNode.Attributes[attributeName];
+            XmlAttribute attribute = xmlNode.Attributes[attributeName];
             if (attribute == null) return null;
             if (attribute == null) return null;
             attribute.Value = attribute.Value.TrimStart(new char[] { '#' });
             attribute.Value = attribute.Value.TrimStart(new char[] { '#' });
             return new Color(
             return new Color(

+ 27 - 27
Content.Pipeline/TilemapImporters/TilemapImporter.cs

@@ -53,8 +53,8 @@ namespace nkast.Aether.Content.Pipeline
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             xmlDoc.Load(filename);
             xmlDoc.Load(filename);
 
 
-            var map = xmlDoc.DocumentElement;
-            var orientation = map.GetAttribute("orientation");
+            XmlElement map = xmlDoc.DocumentElement;
+            string orientation = map.GetAttribute("orientation");
             if (orientation != "orthogonal")
             if (orientation != "orthogonal")
                 throw new InvalidContentException("Invalid orientation. Only 'orthogonal' is supported for atlases.");
                 throw new InvalidContentException("Invalid orientation. Only 'orthogonal' is supported for atlases.");
             output.Renderorder = map.GetAttribute("renderorder");
             output.Renderorder = map.GetAttribute("renderorder");
@@ -70,34 +70,34 @@ namespace nkast.Aether.Content.Pipeline
 
 
             if (tilesetNode.Attributes["source"] != null)
             if (tilesetNode.Attributes["source"] != null)
             {
             {
-                var tsxFilename = tilesetNode.Attributes["source"].Value;
-                var baseDirectory = Path.GetDirectoryName(filename);
+                string tsxFilename = tilesetNode.Attributes["source"].Value;
+                string baseDirectory = Path.GetDirectoryName(filename);
                 tsxFilename = Path.Combine(baseDirectory, tsxFilename);
                 tsxFilename = Path.Combine(baseDirectory, tsxFilename);
 
 
-                var tileset = ImportTSX(tsxFilename, context);
+                TilesetContent tileset = ImportTSX(tsxFilename, context);
                 output.Tileset = tileset;
                 output.Tileset = tileset;
                 context.AddDependency(tsxFilename);
                 context.AddDependency(tsxFilename);
             }
             }
             else
             else
             {
             {
-                var rootDirectory = Path.GetDirectoryName(filename);
-                var tileset = ImportTileset(tilesetNode, context, rootDirectory);
+                string rootDirectory = Path.GetDirectoryName(filename);
+                TilesetContent tileset = ImportTileset(tilesetNode, context, rootDirectory);
                 output.Tileset = tileset;
                 output.Tileset = tileset;
             }
             }
 
 
             XmlNode layerNode = map["layer"];
             XmlNode layerNode = map["layer"];
-            var layerColumns = Convert.ToInt32(map.Attributes["width"].Value, CultureInfo.InvariantCulture);
-            var layerRows = Convert.ToInt32(map.Attributes["height"].Value, CultureInfo.InvariantCulture);
+            int layerColumns = Convert.ToInt32(map.Attributes["width"].Value, CultureInfo.InvariantCulture);
+            int layerRows = Convert.ToInt32(map.Attributes["height"].Value, CultureInfo.InvariantCulture);
             output.LayerColumns = layerColumns;
             output.LayerColumns = layerColumns;
             output.LayerRows = layerRows;
             output.LayerRows = layerRows;
 
 
             XmlNode layerDataNode = layerNode["data"];
             XmlNode layerDataNode = layerNode["data"];
-            var encoding = layerDataNode.Attributes["encoding"].Value;
+            string encoding = layerDataNode.Attributes["encoding"].Value;
             if (encoding != "csv")
             if (encoding != "csv")
                 throw new InvalidContentException("Invalid encoding. Only 'csv' is supported for data.");
                 throw new InvalidContentException("Invalid encoding. Only 'csv' is supported for data.");
-            var data = layerDataNode.InnerText;
-            var dataStringList = data.Split(',');
-            var mapData = new int[dataStringList.Length];
+            string data = layerDataNode.InnerText;
+            string[] dataStringList = data.Split(',');
+            int[] mapData = new int[dataStringList.Length];
             for (int i = 0; i < dataStringList.Length; i++)
             for (int i = 0; i < dataStringList.Length; i++)
                 mapData[i] = Convert.ToInt32(dataStringList[i].Trim(), CultureInfo.InvariantCulture);
                 mapData[i] = Convert.ToInt32(dataStringList[i].Trim(), CultureInfo.InvariantCulture);
             output.MapData = mapData;
             output.MapData = mapData;
@@ -110,7 +110,7 @@ namespace nkast.Aether.Content.Pipeline
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             xmlDoc.Load(tsxFilename);
             xmlDoc.Load(tsxFilename);
             XmlNode tilesetNode = xmlDoc.DocumentElement;
             XmlNode tilesetNode = xmlDoc.DocumentElement;
-            var baseDirectory = Path.GetDirectoryName(tsxFilename);
+            string baseDirectory = Path.GetDirectoryName(tsxFilename);
             return ImportTileset(tilesetNode, context, baseDirectory);
             return ImportTileset(tilesetNode, context, baseDirectory);
         }
         }
 
 
@@ -127,8 +127,8 @@ namespace nkast.Aether.Content.Pipeline
             BitmapContent bm = new PixelBitmapContent<Color>(tileset.TileWidth, tileset.tileHeight);
             BitmapContent bm = new PixelBitmapContent<Color>(tileset.TileWidth, tileset.tileHeight);
             Texture2DContent mt = new Texture2DContent();
             Texture2DContent mt = new Texture2DContent();
             mt.Faces[0].Add(bm);
             mt.Faces[0].Add(bm);
-            mt.Name = "null";            
-            var nullTile = new TileContent();
+            mt.Name = "null";
+            TileContent nullTile = new TileContent();
             nullTile.Tileset = tileset;
             nullTile.Tileset = tileset;
             nullTile.Id = -1;
             nullTile.Id = -1;
             nullTile.SrcTexture = mt;
             nullTile.SrcTexture = mt;
@@ -144,18 +144,18 @@ namespace nkast.Aether.Content.Pipeline
             foreach (XmlNode tileNode in tilesetNode.ChildNodes)
             foreach (XmlNode tileNode in tilesetNode.ChildNodes)
             {
             {
                 if (tileNode.Name != "tile") continue;
                 if (tileNode.Name != "tile") continue;
-                var tileId = tileNode.GetAttributeAsInt("id").Value;
+                int tileId = tileNode.GetAttributeAsInt("id").Value;
 
 
                 XmlNode imageNode = tileNode["image"];
                 XmlNode imageNode = tileNode["image"];
-                
-                //var format = GetAttribute(imageNode, "format");
-                var imageSource = imageNode.GetAttribute("source");
-                var fullImageSource = Path.Combine(baseDirectory, imageSource);
+
+                //string format = GetAttribute(imageNode, "format");
+                string imageSource = imageNode.GetAttribute("source");
+                string fullImageSource = Path.Combine(baseDirectory, imageSource);
                 TextureImporter txImporter = new TextureImporter();
                 TextureImporter txImporter = new TextureImporter();
-                var textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
+                Texture2DContent textureContent = (Texture2DContent)txImporter.Import(fullImageSource, context);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
                 textureContent.Name = Path.GetFileNameWithoutExtension(fullImageSource);
 
 
-                var source = new TileContent();
+                TileContent source = new TileContent();
                 source.Tileset = tileset;
                 source.Tileset = tileset;
                 source.Id = tileId;
                 source.Id = tileId;
                 source.SrcTexture = textureContent;
                 source.SrcTexture = textureContent;
@@ -165,11 +165,11 @@ namespace nkast.Aether.Content.Pipeline
                 source.DstBounds.Location = Point.Zero;
                 source.DstBounds.Location = Point.Zero;
                 source.DstBounds.Width = textureContent.Mipmaps[0].Width;
                 source.DstBounds.Width = textureContent.Mipmaps[0].Width;
                 source.DstBounds.Height = textureContent.Mipmaps[0].Height;
                 source.DstBounds.Height = textureContent.Mipmaps[0].Height;
-                
-                var transKeyColor = imageNode.GetAttributeAsColor("trans");
+
+                Color? transKeyColor = imageNode.GetAttributeAsColor("trans");
                 if (transKeyColor != null)
                 if (transKeyColor != null)
-                    foreach (var mips in textureContent.Faces)
-                        foreach (var mip in mips)
+                    foreach (MipmapChain mips in textureContent.Faces)
+                        foreach (BitmapContent mip in mips)
                             ((PixelBitmapContent<Color>)mip).ReplaceColor(transKeyColor.Value, Color.Transparent);
                             ((PixelBitmapContent<Color>)mip).ReplaceColor(transKeyColor.Value, Color.Transparent);
 
 
                 if (tileId != tileset.SourceTiles.Count-1)
                 if (tileId != tileset.SourceTiles.Count-1)

+ 14 - 14
Content.Pipeline/VoxelImporters/Vox/VoxImporter.cs

@@ -26,11 +26,11 @@ namespace nkast.Aether.Content.Pipeline
         internal VoxelContent ImportVox(string filename, ContentImporterContext context)
         internal VoxelContent ImportVox(string filename, ContentImporterContext context)
         {
         {
             VoxelContent output;
             VoxelContent output;
-            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
+            using (Stream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
             {
             {
-                using (var reader = new BinaryReader(stream))
+                using (BinaryReader reader = new BinaryReader(stream))
                 {
                 {
-                    var contentIdentity = new ContentIdentity(filename);
+                    ContentIdentity contentIdentity = new ContentIdentity(filename);
                     output = ImportVox(reader, contentIdentity, context);
                     output = ImportVox(reader, contentIdentity, context);
                 }
                 }
             }
             }
@@ -42,17 +42,17 @@ namespace nkast.Aether.Content.Pipeline
         {
         {
             VoxelContent output = null;
             VoxelContent output = null;
 
 
-            var header = new VoxHeader(reader);
+            VoxHeader header = new VoxHeader(reader);
 
 
-            var main = new Chunk(reader);
+            Chunk main = new Chunk(reader);
             if (main.ChunkId != Chunk.MAIN)
             if (main.ChunkId != Chunk.MAIN)
                 throw new InvalidContentException("MAIN was expected");
                 throw new InvalidContentException("MAIN was expected");
 
 
-            var chunk = new Chunk(reader);
+            Chunk chunk = new Chunk(reader);
             if (chunk.ChunkId == Chunk.PACK)
             if (chunk.ChunkId == Chunk.PACK)
                 throw new InvalidContentException("PACK is not supported");
                 throw new InvalidContentException("PACK is not supported");
 
 
-            var chunkSIZE = chunk;
+            Chunk chunkSIZE = chunk;
             if (chunkSIZE.ChunkId != Chunk.SIZE)
             if (chunkSIZE.ChunkId != Chunk.SIZE)
                 throw new InvalidContentException("SIZE was expected");
                 throw new InvalidContentException("SIZE was expected");
             int sizeX = reader.ReadInt32();
             int sizeX = reader.ReadInt32();
@@ -60,18 +60,18 @@ namespace nkast.Aether.Content.Pipeline
             int sizeY = reader.ReadInt32();
             int sizeY = reader.ReadInt32();
 
 
 
 
-            var chunkXYZI = new Chunk(reader);
+            Chunk chunkXYZI = new Chunk(reader);
             if (chunkXYZI.ChunkId != Chunk.XYZI)
             if (chunkXYZI.ChunkId != Chunk.XYZI)
                 throw new InvalidContentException("XYZI was expected");
                 throw new InvalidContentException("XYZI was expected");
-            var numVoxels = reader.ReadInt32();
+            int numVoxels = reader.ReadInt32();
 
 
             XYZI[] voxels = new XYZI[numVoxels];
             XYZI[] voxels = new XYZI[numVoxels];
-            for (var i = 0; i < numVoxels; i++)
+            for (int i = 0; i < numVoxels; i++)
             {
             {
-                var x = reader.ReadByte();
-                var z = reader.ReadByte();
-                var y = reader.ReadByte();
-                var ColorIndex = reader.ReadByte();
+                byte x = reader.ReadByte();
+                byte z = reader.ReadByte();
+                byte y = reader.ReadByte();
+                byte ColorIndex = reader.ReadByte();
                 z = (byte)(sizeZ - 1 - z);
                 z = (byte)(sizeZ - 1 - z);
 
 
                 voxels[i].Point = new Point3(x, y, z);
                 voxels[i].Point = new Point3(x, y, z);

+ 4 - 4
Content.Pipeline/VoxelImporters/VoxelContent.cs

@@ -37,7 +37,7 @@ namespace nkast.Aether.Content.Pipeline
             //for(int i = 0; i< Voxels.Length;i++)
             //for(int i = 0; i< Voxels.Length;i++)
             System.Threading.Tasks.Parallel.For(0, Voxels.Length, (i) =>
             System.Threading.Tasks.Parallel.For(0, Voxels.Length, (i) =>
             {
             {
-                var vpt = Voxels[i].Point;
+                Point3 vpt = Voxels[i].Point;
 
 
                 if (blocks.Contains(new Point3(vpt.X - 1, vpt.Y, vpt.Z)))
                 if (blocks.Contains(new Point3(vpt.X - 1, vpt.Y, vpt.Z)))
                     Voxels[i].SharedSides |= Sides.Left;
                     Voxels[i].SharedSides |= Sides.Left;
@@ -61,12 +61,12 @@ namespace nkast.Aether.Content.Pipeline
 
 
         internal void RemoveHiddenBlocks()
         internal void RemoveHiddenBlocks()
         {
         {
-            var visibleBlocks2 = Voxels.Where((v) => { return v.SharedSides != Sides.All; });
+            IEnumerable<XYZI> visibleBlocks2 = Voxels.Where((v) => { return v.SharedSides != Sides.All; });
             Voxels = visibleBlocks2.ToArray();
             Voxels = visibleBlocks2.ToArray();
 
 
             //HashSet<Point3> blocks = new HashSet<Point3>( Voxels.Select<XYZI, Point3>((v) => { return v.Point; }) );
             //HashSet<Point3> blocks = new HashSet<Point3>( Voxels.Select<XYZI, Point3>((v) => { return v.Point; }) );
             //HashSet<Point3> insideBlocks = new HashSet<Point3>();
             //HashSet<Point3> insideBlocks = new HashSet<Point3>();
-            
+
             //for (int z = 1; z < GridSize.Z - 1; z++)
             //for (int z = 1; z < GridSize.Z - 1; z++)
             //{
             //{
             //    for (int y = 1; y < GridSize.Y - 1; y++)
             //    for (int y = 1; y < GridSize.Y - 1; y++)
@@ -87,7 +87,7 @@ namespace nkast.Aether.Content.Pipeline
             //    }
             //    }
             //}
             //}
 
 
-            //var visibleBlocks = Voxels.Where((v) => { return !insideBlocks.Contains(v.Point); });
+            //IEnumerable<XYZI> visibleBlocks = Voxels.Where((v) => { return !insideBlocks.Contains(v.Point); });
             //Voxels = visibleBlocks.ToArray();
             //Voxels = visibleBlocks.ToArray();
 
 
             return;
             return;

+ 32 - 32
Content.Pipeline/VoxelImporters/VoxelModelImporter.cs

@@ -58,48 +58,48 @@ namespace nkast.Aether.Content.Pipeline
             XYZI[] voxels = voxel.Voxels;
             XYZI[] voxels = voxel.Voxels;
             uint[] palette = voxel.Palette;
             uint[] palette = voxel.Palette;
 
 
-            var scale = voxel.RealSize / voxel.GridSize;
+            Vector3 scale = voxel.RealSize / voxel.GridSize;
             Vector3 centerOffset = new Vector3(1f, 1f, 1f) * (voxel.RealSize / -2f);
             Vector3 centerOffset = new Vector3(1f, 1f, 1f) * (voxel.RealSize / -2f);
 
 
-            var corner000 = new Point3(0, 0, 0);
-            var corner100 = new Point3(1, 0, 0);
-            var corner010 = new Point3(0, 1, 0);
-            var corner110 = new Point3(1, 1, 0);
-            var corner001 = new Point3(0, 0, 1);
-            var corner101 = new Point3(1, 0, 1);
-            var corner011 = new Point3(0, 1, 1);
-            var corner111 = new Point3(1, 1, 1);
+            Point3 corner000 = new Point3(0, 0, 0);
+            Point3 corner100 = new Point3(1, 0, 0);
+            Point3 corner010 = new Point3(0, 1, 0);
+            Point3 corner110 = new Point3(1, 1, 0);
+            Point3 corner001 = new Point3(0, 0, 1);
+            Point3 corner101 = new Point3(1, 0, 1);
+            Point3 corner011 = new Point3(0, 1, 1);
+            Point3 corner111 = new Point3(1, 1, 1);
 
 
 
 
-            var Forward = Vector3.Forward;
-            var Backward = Vector3.Backward;
-            var Left = Vector3.Left;
-            var Right = Vector3.Right;
-            var Up = Vector3.Up;
-            var Down = Vector3.Down;
+            Vector3 Forward = Vector3.Forward;
+            Vector3 Backward = Vector3.Backward;
+            Vector3 Left = Vector3.Left;
+            Vector3 Right = Vector3.Right;
+            Vector3 Up = Vector3.Up;
+            Vector3 Down = Vector3.Down;
 
 
             for (int i = 0; i < voxels.Length; i++)
             for (int i = 0; i < voxels.Length; i++)
             {
             {
-                var pt000 = voxels[i].Point.Add(ref corner000);
-                var pt100 = voxels[i].Point.Add(ref corner100);
-                var pt010 = voxels[i].Point.Add(ref corner010);
-                var pt110 = voxels[i].Point.Add(ref corner110);
-                var pt001 = voxels[i].Point.Add(ref corner001);
-                var pt101 = voxels[i].Point.Add(ref corner101);
-                var pt011 = voxels[i].Point.Add(ref corner011);
-                var pt111 = voxels[i].Point.Add(ref corner111);
+                Point3 pt000 = voxels[i].Point.Add(ref corner000);
+                Point3 pt100 = voxels[i].Point.Add(ref corner100);
+                Point3 pt010 = voxels[i].Point.Add(ref corner010);
+                Point3 pt110 = voxels[i].Point.Add(ref corner110);
+                Point3 pt001 = voxels[i].Point.Add(ref corner001);
+                Point3 pt101 = voxels[i].Point.Add(ref corner101);
+                Point3 pt011 = voxels[i].Point.Add(ref corner011);
+                Point3 pt111 = voxels[i].Point.Add(ref corner111);
 
 
                 // back
                 // back
-                var p0 = pt000.ToVector3();
-                var p1 = pt100.ToVector3();
-                var p2 = pt010.ToVector3();
-                var p3 = pt110.ToVector3();
+                Vector3 p0 = pt000.ToVector3();
+                Vector3 p1 = pt100.ToVector3();
+                Vector3 p2 = pt010.ToVector3();
+                Vector3 p3 = pt110.ToVector3();
 
 
                 // front
                 // front
-                var p4 = pt001.ToVector3();
-                var p5 = pt101.ToVector3();
-                var p6 = pt011.ToVector3();
-                var p7 = pt111.ToVector3();
+                Vector3 p4 = pt001.ToVector3();
+                Vector3 p5 = pt101.ToVector3();
+                Vector3 p6 = pt011.ToVector3();
+                Vector3 p7 = pt111.ToVector3();
 
 
                 Vector3.Multiply(ref p0, ref scale, out p0); Vector3.Add(ref p0, ref centerOffset, out p0);
                 Vector3.Multiply(ref p0, ref scale, out p0); Vector3.Add(ref p0, ref centerOffset, out p0);
                 Vector3.Multiply(ref p1, ref scale, out p1); Vector3.Add(ref p1, ref centerOffset, out p1);
                 Vector3.Multiply(ref p1, ref scale, out p1); Vector3.Add(ref p1, ref centerOffset, out p1);
@@ -190,7 +190,7 @@ namespace nkast.Aether.Content.Pipeline
                 mesh.Positions.Add(this.vertices[pi].Position);
                 mesh.Positions.Add(this.vertices[pi].Position);
             }
             }
 
 
-            var geom = new GeometryContent();
+            GeometryContent geom = new GeometryContent();
             mesh.Geometry.Add(geom);
             mesh.Geometry.Add(geom);
             BasicMaterialContent material = new BasicMaterialContent();
             BasicMaterialContent material = new BasicMaterialContent();
             geom.Material = material;
             geom.Material = material;

+ 6 - 6
Graphics/ContentReaders/DynamicIndexBufferReader.cs

@@ -24,11 +24,11 @@ namespace nkast.Aether.Graphics.Content
         protected override DynamicIndexBuffer Read(ContentReader input, DynamicIndexBuffer buffer)
         protected override DynamicIndexBuffer Read(ContentReader input, DynamicIndexBuffer buffer)
         {   
         {   
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
-            var device = graphicsDeviceService.GraphicsDevice;
+            GraphicsDevice device = graphicsDeviceService.GraphicsDevice;
 
 
             // read IndexBuffer
             // read IndexBuffer
-            var is16Bit = input.ReadBoolean();
-            var dataSize = (int)input.ReadUInt32();
+            bool is16Bit = input.ReadBoolean();
+            int dataSize = (int)input.ReadUInt32();
             byte[] data = new byte[dataSize];
             byte[] data = new byte[dataSize];
             input.Read(data, 0, dataSize);
             input.Read(data, 0, dataSize);
 
 
@@ -38,9 +38,9 @@ namespace nkast.Aether.Graphics.Content
 
 
             if (buffer == null)
             if (buffer == null)
             {
             {
-                var elementSize = (is16Bit) ? IndexElementSize.SixteenBits : IndexElementSize.ThirtyTwoBits;
-                var stride = (is16Bit) ? 2 : 4;
-                var indexCount = dataSize / stride;
+                IndexElementSize elementSize = (is16Bit) ? IndexElementSize.SixteenBits : IndexElementSize.ThirtyTwoBits;
+                int stride = (is16Bit) ? 2 : 4;
+                int indexCount = dataSize / stride;
                 BufferUsage usage = (IsWriteOnly) ? BufferUsage.WriteOnly : BufferUsage.None;
                 BufferUsage usage = (IsWriteOnly) ? BufferUsage.WriteOnly : BufferUsage.None;
                 buffer = new DynamicIndexBuffer(device, elementSize, indexCount, usage);
                 buffer = new DynamicIndexBuffer(device, elementSize, indexCount, usage);
             }
             }

+ 3 - 3
Graphics/ContentReaders/DynamicVertexBufferReader.cs

@@ -24,11 +24,11 @@ namespace nkast.Aether.Graphics.Content
         protected override DynamicVertexBuffer Read(ContentReader input, DynamicVertexBuffer buffer)
         protected override DynamicVertexBuffer Read(ContentReader input, DynamicVertexBuffer buffer)
         {   
         {   
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
-            var device = graphicsDeviceService.GraphicsDevice;
+            GraphicsDevice device = graphicsDeviceService.GraphicsDevice;
 
 
             // read standard VertexBuffer
             // read standard VertexBuffer
-            var declaration = input.ReadRawObject<VertexDeclaration>();
-            var vertexCount = (int)input.ReadUInt32();
+            VertexDeclaration declaration = input.ReadRawObject<VertexDeclaration>();
+            int vertexCount = (int)input.ReadUInt32();
             int dataSize = vertexCount * declaration.VertexStride;
             int dataSize = vertexCount * declaration.VertexStride;
             byte[] data = new byte[dataSize];
             byte[] data = new byte[dataSize];
             input.Read(data, 0, dataSize);
             input.Read(data, 0, dataSize);

+ 6 - 6
Shaders/Deferred/DeferredBasicEffect.cs

@@ -36,14 +36,14 @@ namespace nkast.Aether.Shaders
         #region Fields
         #region Fields
 
 
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.DeferredBasicEffect";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.DeferredBasicEffect";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(DeferredBasicEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(DeferredBasicEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -51,8 +51,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -73,7 +73,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 6 - 6
Shaders/Deferred/DeferredClearGBufferEffect.cs

@@ -31,14 +31,14 @@ namespace nkast.Aether.Shaders
         #region Fields
         #region Fields
 
 
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.DeferredClearGBuffer";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.DeferredClearGBuffer";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(DeferredClearGBufferEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(DeferredClearGBufferEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -46,8 +46,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -68,7 +68,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 6 - 6
Shaders/Deferred/DeferredCombineEffect.cs

@@ -35,14 +35,14 @@ namespace nkast.Aether.Shaders
         #region Fields
         #region Fields
 
 
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.DeferredCombine";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.DeferredCombine";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(DeferredCombineEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(DeferredCombineEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -50,8 +50,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -72,7 +72,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 6 - 6
Shaders/Deferred/DeferredPointLightEffect.cs

@@ -48,14 +48,14 @@ namespace nkast.Aether.Shaders
         #region Fields
         #region Fields
 
 
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.DeferredPointLight";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.DeferredPointLight";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(DeferredPointLightEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(DeferredPointLightEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -63,8 +63,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -85,7 +85,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version  
             // Detect version  
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 6 - 6
Shaders/Deferred/DeferredSpotLightEffect.cs

@@ -52,14 +52,14 @@ namespace nkast.Aether.Shaders
         #region Fields
         #region Fields
 
 
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.DeferredSpotLight";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.DeferredSpotLight";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(DeferredPointLightEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(DeferredPointLightEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -68,8 +68,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -90,7 +90,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version  
             // Detect version  
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 5 - 5
Shaders/FXAA/FXAAEffect.cs

@@ -51,9 +51,9 @@ namespace nkast.Aether.Shaders
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(FXAAEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(FXAAEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -61,8 +61,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinHiDef";
             platformName = ".xna.WinHiDef";
@@ -83,7 +83,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 1 - 1
Shaders/FXAA/FXAAGreenLumaHighEffect.cs

@@ -21,7 +21,7 @@ namespace nkast.Aether.Shaders
 {
 {
     public class FXAAGreenLumaHighEffect : FXAAEffect 
     public class FXAAGreenLumaHighEffect : FXAAEffect 
     {
     {
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaHigh";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaHigh";
 
 
 
 
         public FXAAGreenLumaHighEffect(GraphicsDevice graphicsDevice)
         public FXAAGreenLumaHighEffect(GraphicsDevice graphicsDevice)

+ 1 - 1
Shaders/FXAA/FXAAGreenLumaLowEffect.cs

@@ -21,7 +21,7 @@ namespace nkast.Aether.Shaders
 {
 {
     public class FXAAGreenLumaLowEffect : FXAAEffect 
     public class FXAAGreenLumaLowEffect : FXAAEffect 
     {
     {
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaLow";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaLow";
 
 
 
 
         public FXAAGreenLumaLowEffect(GraphicsDevice graphicsDevice)
         public FXAAGreenLumaLowEffect(GraphicsDevice graphicsDevice)

+ 1 - 1
Shaders/FXAA/FXAAGreenLumaMediumEffect.cs

@@ -21,7 +21,7 @@ namespace nkast.Aether.Shaders
 {
 {
     public class FXAAGreenLumaMediumEffect : FXAAEffect 
     public class FXAAGreenLumaMediumEffect : FXAAEffect 
     {
     {
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaMedium";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.FXAAGreenLumaMedium";
 
 
 
 
         public FXAAGreenLumaMediumEffect(GraphicsDevice graphicsDevice)
         public FXAAGreenLumaMediumEffect(GraphicsDevice graphicsDevice)

+ 7 - 7
Shaders/InfiniteGrid/InfiniteGridEffect.cs

@@ -39,13 +39,13 @@ namespace nkast.Aether.Shaders
 
 
         #region Fields
         #region Fields
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.InfiniteGridEffect";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.InfiniteGridEffect";
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
             string profileName = (graphicsDevice.GraphicsProfile == GraphicsProfile.Reach) ? ".Reach" : ".HiDef";
             string profileName = (graphicsDevice.GraphicsProfile == GraphicsProfile.Reach) ? ".Reach" : ".HiDef";
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna";
             platformName = ".xna";
@@ -66,7 +66,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)
@@ -86,9 +86,9 @@ namespace nkast.Aether.Shaders
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(InfiniteGridEffect)).GetManifestResourceStream(name))
+            using (Stream stream = GetAssembly(typeof(InfiniteGridEffect)).GetManifestResourceStream(name))
             {
             {
-                var bytecode = new byte[stream.Length];
+                byte[] bytecode = new byte[stream.Length];
                 stream.Read(bytecode, 0, (int)stream.Length);
                 stream.Read(bytecode, 0, (int)stream.Length);
                 return bytecode;
                 return bytecode;
             }
             }
@@ -200,7 +200,7 @@ namespace nkast.Aether.Shaders
 
 
         internal void SetDefaultParameters(Viewport viewport, Matrix projection, Matrix view, Matrix EditMatrix)
         internal void SetDefaultParameters(Viewport viewport, Matrix projection, Matrix view, Matrix EditMatrix)
         {
         {
-            var editPlane = new Plane(EditMatrix.Forward, Vector3.Dot(EditMatrix.Forward, EditMatrix.Translation));
+            Plane editPlane = new Plane(EditMatrix.Forward, Vector3.Dot(EditMatrix.Forward, EditMatrix.Translation));
 
 
             TexelSize = new Vector2(1f / viewport.Width, 1f / viewport.Height);
             TexelSize = new Vector2(1f / viewport.Width, 1f / viewport.Height);
             InvProjection = Matrix.Invert(projection);
             InvProjection = Matrix.Invert(projection);

+ 6 - 6
Shaders/Tilemap/TilemapEffect.cs

@@ -63,13 +63,13 @@ namespace nkast.Aether.Shaders
 
 
         EffectDirtyFlags dirtyFlags = EffectDirtyFlags.All;
         EffectDirtyFlags dirtyFlags = EffectDirtyFlags.All;
 
 
-        static readonly String ResourceName = "nkast.Aether.Shaders.Resources.TilemapEffect";
+        static readonly string ResourceName = "nkast.Aether.Shaders.Resources.TilemapEffect";
 
 
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         internal static byte[] LoadEffectResource(GraphicsDevice graphicsDevice, string name)
         {
         {
             name = GetResourceName(graphicsDevice, name);
             name = GetResourceName(graphicsDevice, name);
-            using (var stream = GetAssembly(typeof(TilemapEffect)).GetManifestResourceStream(name))
-            using (var ms = new MemoryStream())
+            using (Stream stream = GetAssembly(typeof(TilemapEffect)).GetManifestResourceStream(name))
+            using (MemoryStream ms = new MemoryStream())
             {
             {
                 stream.CopyTo(ms);
                 stream.CopyTo(ms);
                 return ms.ToArray();
                 return ms.ToArray();
@@ -78,8 +78,8 @@ namespace nkast.Aether.Shaders
 
 
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         private static string GetResourceName(GraphicsDevice graphicsDevice, string name)
         {
         {
-            String platformName = "";
-            var version = "";
+            string platformName = "";
+            string version = "";
 
 
 #if XNA
 #if XNA
             platformName = ".xna.WinReach";
             platformName = ".xna.WinReach";
@@ -100,7 +100,7 @@ namespace nkast.Aether.Shaders
 
 
             // Detect version
             // Detect version
             version = ".10";
             version = ".10";
-            var kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
+            Version kniVersion = GetAssembly(typeof(Effect)).GetName().Version;
             if (kniVersion.Major == 3)
             if (kniVersion.Major == 3)
             {
             {
                 if (kniVersion.Minor == 9)
                 if (kniVersion.Minor == 9)

+ 9 - 8
Tilemap/ContentReaders/TilemapReader.cs

@@ -15,6 +15,7 @@
 #endregion
 #endregion
 
 
 using System;
 using System;
+using System.Reflection;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Content;
 using Microsoft.Xna.Framework.Content;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Graphics;
@@ -28,7 +29,7 @@ namespace nkast.Aether.Graphics.Content
         protected override Tilemap Read(ContentReader input, Tilemap existingInstance)
         protected override Tilemap Read(ContentReader input, Tilemap existingInstance)
         {
         {
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
             IGraphicsDeviceService graphicsDeviceService = (IGraphicsDeviceService)input.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));
-            var device = graphicsDeviceService.GraphicsDevice;
+            GraphicsDevice device = graphicsDeviceService.GraphicsDevice;
 
 
 
 
             Tilemap output = existingInstance ?? new Tilemap();
             Tilemap output = existingInstance ?? new Tilemap();
@@ -39,15 +40,15 @@ namespace nkast.Aether.Graphics.Content
             output.TextureMap = ReadTexture2D(input, output.TextureMap);
             output.TextureMap = ReadTexture2D(input, output.TextureMap);
 
 
             // read Sprites
             // read Sprites
-            var count = input.ReadInt32();
+            int count = input.ReadInt32();
             for (int i = 0; i < count; i++)
             for (int i = 0; i < count; i++)
             {
             {
-                var name = input.ReadString();
-                var bounds = new Rectangle(input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
+                string name = input.ReadString();
+                Rectangle bounds = new Rectangle(input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
                 output.Sprites[name] = new Tile(output.TextureAtlas, bounds);
                 output.Sprites[name] = new Tile(output.TextureAtlas, bounds);
             }
             }
 
 
-            var tilemapEffect = new TilemapEffect(device);
+            TilemapEffect tilemapEffect = new TilemapEffect(device);
             tilemapEffect.Alpha = 1f;
             tilemapEffect.Alpha = 1f;
             tilemapEffect.VertexColorEnabled = true;
             tilemapEffect.VertexColorEnabled = true;
             tilemapEffect.DiffuseColor = new Vector3(1f, 1f, 1f);
             tilemapEffect.DiffuseColor = new Vector3(1f, 1f, 1f);
@@ -75,9 +76,9 @@ namespace nkast.Aether.Graphics.Content
             }
             }
             catch(NotSupportedException)
             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);
+                Assembly assembly = typeof(ContentTypeReader).Assembly;
+                Type texture2DReaderType = assembly.GetType("Microsoft.Xna.Framework.Content.Texture2DReader");
+                ContentTypeReader texture2DReader = (ContentTypeReader)Activator.CreateInstance(texture2DReaderType, true);
                 output = input.ReadRawObject<Texture2D>(texture2DReader, existingInstance);
                 output = input.ReadRawObject<Texture2D>(texture2DReader, existingInstance);
             }
             }