diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj index 89b1bcb2..f35b50b4 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj @@ -106,6 +106,7 @@ + @@ -184,6 +185,7 @@ + diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj index 3386f47b..0464ffe8 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj @@ -108,6 +108,7 @@ + @@ -186,6 +187,7 @@ + diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj index 55b3b21a..23ee625f 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj @@ -109,6 +109,7 @@ + @@ -187,6 +188,7 @@ + diff --git a/ANX.Framework.TestCenter/ANX.Framework.TestCenter.csproj b/ANX.Framework.TestCenter/ANX.Framework.TestCenter.csproj index d6c87abd..1750c86b 100644 --- a/ANX.Framework.TestCenter/ANX.Framework.TestCenter.csproj +++ b/ANX.Framework.TestCenter/ANX.Framework.TestCenter.csproj @@ -70,6 +70,17 @@ + + + + + + + + + + + diff --git a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_Linux.csproj b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_Linux.csproj index d89c4b2f..b5124b36 100644 --- a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_Linux.csproj +++ b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_Linux.csproj @@ -70,6 +70,17 @@ + + + + + + + + + + + diff --git a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_PSVita.csproj b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_PSVita.csproj index 67cf7538..303e0671 100644 --- a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_PSVita.csproj +++ b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_PSVita.csproj @@ -71,6 +71,17 @@ + + + + + + + + + + + diff --git a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_WindowsMetro.csproj b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_WindowsMetro.csproj index 583d7db7..e5f1cfdb 100644 --- a/ANX.Framework.TestCenter/ANX.Framework.TestCenter_WindowsMetro.csproj +++ b/ANX.Framework.TestCenter/ANX.Framework.TestCenter_WindowsMetro.csproj @@ -72,6 +72,17 @@ + + + + + + + + + + + diff --git a/ANX.Framework.TestCenter/Strukturen/EnumValidationTest.cs b/ANX.Framework.TestCenter/Strukturen/EnumValidationTest.cs index 4eae55fb..1c7b9258 100644 --- a/ANX.Framework.TestCenter/Strukturen/EnumValidationTest.cs +++ b/ANX.Framework.TestCenter/Strukturen/EnumValidationTest.cs @@ -3,6 +3,7 @@ using ANX.Framework.Audio; using ANX.Framework.GamerServices; using ANX.Framework.Graphics; using ANX.Framework.Input; +using ANX.Framework.Input.Touch; using ANX.Framework.Media; using ANX.Framework.Net; using NUnit.Framework; @@ -65,6 +66,9 @@ namespace ANX.Framework.TestCenter.Strukturen new object[] { typeof(Microsoft.Xna.Framework.Media.MediaSourceType), typeof(MediaSourceType) }, new object[] { typeof(Microsoft.Xna.Framework.Media.MediaState), typeof(MediaState) }, + new object[] { typeof(Microsoft.Xna.Framework.Input.Touch.GestureType), typeof(GestureType) }, + new object[] { typeof(Microsoft.Xna.Framework.Input.Touch.TouchLocationState), typeof(TouchLocationState) }, + new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionEndReason), typeof(NetworkSessionEndReason) }, new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionJoinError), typeof(NetworkSessionJoinError) }, new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionState), typeof(NetworkSessionState) }, diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/DisplayModeCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/DisplayModeCollectionTest.cs new file mode 100644 index 00000000..55ff95c5 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/DisplayModeCollectionTest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Reflection; +using ANX.Framework.Graphics; +using NUnit.Framework; + +using XNADisplayMode = Microsoft.Xna.Framework.Graphics.DisplayMode; +using XNADisplayModeCollection = Microsoft.Xna.Framework.Graphics.DisplayModeCollection; +using XNASurfaceFormat = Microsoft.Xna.Framework.Graphics.SurfaceFormat; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class DisplayModeCollectionTest + { + [Test] + public void Accessor() + { + var xnaModeParameters = new object[] { 800, 600, XNASurfaceFormat.Color }; + var xnaMode = (XNADisplayMode)Activator.CreateInstance(typeof(XNADisplayMode), + BindingFlags.NonPublic | BindingFlags.Instance, null, xnaModeParameters, CultureInfo.InvariantCulture); + var anxModeParameters = new object[] { 800, 600, SurfaceFormat.Color }; + var anxMode = (DisplayMode)Activator.CreateInstance(typeof(DisplayMode), + BindingFlags.NonPublic | BindingFlags.Instance, null, anxModeParameters, CultureInfo.InvariantCulture); + + var xnaModeList = new List {xnaMode}; + var anxModeList = new List {anxMode}; + var xnaCollectionParameters = new object[] { xnaModeList }; + var xna = (XNADisplayModeCollection)Activator.CreateInstance(typeof(XNADisplayModeCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, xnaCollectionParameters, CultureInfo.InvariantCulture); + var anxCollectionParameters = new object[] { anxModeList }; + var anx = (DisplayModeCollection)Activator.CreateInstance(typeof(DisplayModeCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, anxCollectionParameters, CultureInfo.InvariantCulture); + + Assert.AreEqual((xna[XNASurfaceFormat.Color] as List).Count, + (anx[SurfaceFormat.Color] as List).Count); + + Assert.AreEqual((xna[XNASurfaceFormat.Bgra5551] as List).Count, + (anx[SurfaceFormat.Bgra5551] as List).Count); + } + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/EffectAnnotationCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectAnnotationCollectionTest.cs new file mode 100644 index 00000000..fcdcf30e --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectAnnotationCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class EffectAnnotationCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/EffectParameterCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectParameterCollectionTest.cs new file mode 100644 index 00000000..f3715664 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectParameterCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class EffectParameterCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/EffectPassCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectPassCollectionTest.cs new file mode 100644 index 00000000..e93aa1e5 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectPassCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class EffectPassCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/EffectTechniqueCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectTechniqueCollectionTest.cs new file mode 100644 index 00000000..e1e46c6f --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/EffectTechniqueCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class EffectTechniqueCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneCollectionTest.cs new file mode 100644 index 00000000..5ed3dd08 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneCollectionTest.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Reflection; +using ANX.Framework.Graphics; +using NUnit.Framework; + +using XNAModelBone = Microsoft.Xna.Framework.Graphics.ModelBone; +using XNAModelBoneCollection = Microsoft.Xna.Framework.Graphics.ModelBoneCollection; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class ModelBoneCollectionTest + { + [Test] + public void Constructor() + { + XNAModelBoneCollection xna; + ModelBoneCollection anx; + CreateCollections(out xna, out anx); + + Assert.AreEqual(xna.Count, anx.Count); + } + + [Test] + public void AccessorArgumentNull() + { + XNAModelBoneCollection xna; + ModelBoneCollection anx; + CreateCollections(out xna, out anx); + + TestDelegate xnaDeleg = delegate { XNAModelBone xnaBone = xna[""]; }; + TestDelegate anxDeleg = delegate { ModelBone anxBone = anx[""]; }; + + AssertHelper.ConvertEquals(Assert.Throws(xnaDeleg), + Assert.Throws(anxDeleg), "AccessorArgumentNull"); + } + + [Test] + public void AccessorKeyNotFound() + { + XNAModelBoneCollection xna; + ModelBoneCollection anx; + CreateCollections(out xna, out anx); + + TestDelegate xnaDeleg = delegate { XNAModelBone xnaBone = xna["test"]; }; + TestDelegate anxDeleg = delegate { ModelBone anxBone = anx["test"]; }; + + AssertHelper.ConvertEquals(Assert.Throws(xnaDeleg), + Assert.Throws(anxDeleg), "AccessorKeyNotFound"); + } + + [Test] + public void Accessor() + { + XNAModelBoneCollection xna; + ModelBoneCollection anx; + CreateCollections(out xna, out anx); + + XNAModelBone xnaBone = xna["bone1"]; + ModelBone anxBone = anx["bone1"]; + + Assert.AreEqual(xnaBone.Index, anxBone.Index); + AssertHelper.ConvertEquals(xnaBone.Transform, anxBone.Transform, "Accessor"); + } + + private void CreateCollections(out XNAModelBoneCollection xna, out ModelBoneCollection anx) + { + XNAModelBone xnaBone; + ModelBone anxBone; + ModelBoneTest.CreateBones(out xnaBone, out anxBone); + var xnaParameters = new object[] { new[] { xnaBone } }; + xna = (XNAModelBoneCollection)Activator.CreateInstance(typeof(XNAModelBoneCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture); + + var anxParameters = new object[] { new[] { anxBone } }; + anx = (ModelBoneCollection)Activator.CreateInstance(typeof(ModelBoneCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture); + } + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneTest.cs new file mode 100644 index 00000000..f794ac74 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelBoneTest.cs @@ -0,0 +1,43 @@ +using System; +using System.Globalization; +using System.Reflection; +using ANX.Framework.Graphics; +using NUnit.Framework; + +using XNAModelBone = Microsoft.Xna.Framework.Graphics.ModelBone; +using XNAMatrix = Microsoft.Xna.Framework.Matrix; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class ModelBoneTest + { + [Test] + public void Constructor() + { + XNAModelBone xna; + ModelBone anx; + CreateBones(out xna, out anx); + + Assert.AreEqual(xna.Name, anx.Name); + Assert.AreEqual(xna.Index, anx.Index); + Assert.AreEqual(xna.Parent, anx.Parent); + Assert.AreEqual(xna.Children, anx.Children); + AssertHelper.ConvertEquals(xna.Transform, anx.Transform, "Constructor"); + } + + public static void CreateBones(out XNAModelBone xna, out ModelBone anx) + { + var xnaParameters = new object[] { "bone1", XNAMatrix.Identity, 15 }; + xna = (XNAModelBone)Activator.CreateInstance(typeof(XNAModelBone), + BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture); + + var anxParameters = new object[] { "bone1", Matrix.Identity, 15 }; + anx = (ModelBone)Activator.CreateInstance(typeof(ModelBone), + BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture); + } + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/ModelEffectCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelEffectCollectionTest.cs new file mode 100644 index 00000000..f9c5c276 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelEffectCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class ModelEffectCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshCollectionTest.cs new file mode 100644 index 00000000..d4fef862 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class ModelMeshCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshPartCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshPartCollectionTest.cs new file mode 100644 index 00000000..a060e5a3 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/ModelMeshPartCollectionTest.cs @@ -0,0 +1,12 @@ +using System; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class ModelMeshPartCollectionTest + { + } +} diff --git a/ANX.Framework.TestCenter/Strukturen/Graphics/SamplerStateCollectionTest.cs b/ANX.Framework.TestCenter/Strukturen/Graphics/SamplerStateCollectionTest.cs new file mode 100644 index 00000000..d98849a4 --- /dev/null +++ b/ANX.Framework.TestCenter/Strukturen/Graphics/SamplerStateCollectionTest.cs @@ -0,0 +1,82 @@ +using System; +using System.Globalization; +using System.Reflection; +using ANX.Framework.Graphics; +using NUnit.Framework; + +using XNASamplerStateCollection = Microsoft.Xna.Framework.Graphics.SamplerStateCollection; +using XNASamplerState = Microsoft.Xna.Framework.Graphics.SamplerState; + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.TestCenter.Strukturen.Graphics +{ + class SamplerStateCollectionTest + { + [Test] + public void Constructor() + { + XNASamplerStateCollection xna; + SamplerStateCollection anx; + CreateCollections(out xna, out anx); + + Assert.Null(xna[0]); + Assert.Null(anx[0]); + } + + [Test] + public void AccessorOutOfRangeLowerBound() + { + XNASamplerStateCollection xna; + SamplerStateCollection anx; + CreateCollections(out xna, out anx); + + TestDelegate xnaOutOfRangeDeleg = () => xna[-1] = null; + TestDelegate anxOutOfRangeDeleg = () => anx[-1] = null; + + AssertHelper.ConvertEquals(Assert.Throws(xnaOutOfRangeDeleg), + Assert.Throws(anxOutOfRangeDeleg), "AccessorOutOfRangeLowerBound"); + } + + [Test] + public void AccessorOutOfRangeUpperBound() + { + XNASamplerStateCollection xna; + SamplerStateCollection anx; + CreateCollections(out xna, out anx); + + TestDelegate xnaOutOfRangeDeleg = () => xna[20] = null; + TestDelegate anxOutOfRangeDeleg = () => anx[20] = null; + + AssertHelper.ConvertEquals(Assert.Throws(xnaOutOfRangeDeleg), + Assert.Throws(anxOutOfRangeDeleg), "AccessorOutOfRangeUpperBound"); + } + + [Test] + public void AccessorNullException() + { + XNASamplerStateCollection xna; + SamplerStateCollection anx; + CreateCollections(out xna, out anx); + + TestDelegate xnaOutOfRangeDeleg = () => xna[2] = null; + TestDelegate anxOutOfRangeDeleg = () => anx[2] = null; + + AssertHelper.ConvertEquals(Assert.Throws(xnaOutOfRangeDeleg), + Assert.Throws(anxOutOfRangeDeleg), "AccessorNullException"); + } + + private void CreateCollections(out XNASamplerStateCollection xna, out SamplerStateCollection anx) + { + var xnaParameters = new object[] { null, 0, 8 }; + xna = (XNASamplerStateCollection)Activator.CreateInstance(typeof(XNASamplerStateCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture); + + var anxParameters = new object[] { null, 8 }; + anx = (SamplerStateCollection)Activator.CreateInstance(typeof(SamplerStateCollection), + BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture); + } + } +} diff --git a/ANX.Framework.sln b/ANX.Framework.sln index 7a767847..7662d09b 100644 --- a/ANX.Framework.sln +++ b/ANX.Framework.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}" diff --git a/ANX.Framework/Graphics/DisplayModeCollection.cs b/ANX.Framework/Graphics/DisplayModeCollection.cs index 61c21488..a2b8952d 100644 --- a/ANX.Framework/Graphics/DisplayModeCollection.cs +++ b/ANX.Framework/Graphics/DisplayModeCollection.cs @@ -15,17 +15,14 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.Tested)] public class DisplayModeCollection : IEnumerable, IEnumerable { private readonly List displayModes; public IEnumerable this[SurfaceFormat format] { - get - { - return displayModes.Where(current => current.Format == format).ToList(); - } + get { return displayModes.Where(current => current.Format == format).ToList(); } } internal DisplayModeCollection(List displayModes) @@ -37,6 +34,7 @@ namespace ANX.Framework.Graphics { return displayModes.GetEnumerator(); } + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); diff --git a/ANX.Framework/Graphics/EffectAnnotationCollection.cs b/ANX.Framework/Graphics/EffectAnnotationCollection.cs index 4aecd0b0..d726427a 100644 --- a/ANX.Framework/Graphics/EffectAnnotationCollection.cs +++ b/ANX.Framework/Graphics/EffectAnnotationCollection.cs @@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class EffectAnnotationCollection : IEnumerable { private readonly List annotations; diff --git a/ANX.Framework/Graphics/EffectParameterCollection.cs b/ANX.Framework/Graphics/EffectParameterCollection.cs index 601826c1..a2f5f00e 100644 --- a/ANX.Framework/Graphics/EffectParameterCollection.cs +++ b/ANX.Framework/Graphics/EffectParameterCollection.cs @@ -15,8 +15,8 @@ using ANX.Framework.NonXNA.Development; namespace ANX.Framework.Graphics { [PercentageComplete(100)] - [TestState(TestStateAttribute.TestState.Untested)] [Developer("Glatzemann")] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class EffectParameterCollection : IEnumerable { #region Private Members diff --git a/ANX.Framework/Graphics/EffectPassCollection.cs b/ANX.Framework/Graphics/EffectPassCollection.cs index bbfd374c..4e8c6da8 100644 --- a/ANX.Framework/Graphics/EffectPassCollection.cs +++ b/ANX.Framework/Graphics/EffectPassCollection.cs @@ -16,7 +16,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann, AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class EffectPassCollection : IEnumerable { #region Private Members @@ -50,9 +50,7 @@ namespace ANX.Framework.Graphics this.passes = new List(); foreach (EffectPass pass in parentTechnique.Passes) - { this.passes.Add(pass); - } } IEnumerator IEnumerable.GetEnumerator() diff --git a/ANX.Framework/Graphics/EffectTechniqueCollection.cs b/ANX.Framework/Graphics/EffectTechniqueCollection.cs index fd59ca39..e7a577c1 100644 --- a/ANX.Framework/Graphics/EffectTechniqueCollection.cs +++ b/ANX.Framework/Graphics/EffectTechniqueCollection.cs @@ -17,7 +17,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann, AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class EffectTechniqueCollection : IEnumerable, IEnumerable { #region Private Members diff --git a/ANX.Framework/Graphics/GraphicsDevice.cs b/ANX.Framework/Graphics/GraphicsDevice.cs index 3728741b..2e564c7c 100644 --- a/ANX.Framework/Graphics/GraphicsDevice.cs +++ b/ANX.Framework/Graphics/GraphicsDevice.cs @@ -59,6 +59,7 @@ namespace ANX.Framework.Graphics this.textureCollection = new TextureCollection(16); this.vertexTextureCollection = new TextureCollection(16); + samplerStateCollection.InitializeDeviceState(); this.BlendState = BlendState.Opaque; this.DepthStencilState = DepthStencilState.Default; this.RasterizerState = RasterizerState.CullCounterClockwise; @@ -366,6 +367,8 @@ namespace ANX.Framework.Graphics this.viewport = new Graphics.Viewport(0, 0, presentationParameters.BackBufferWidth, presentationParameters.BackBufferHeight); + samplerStateCollection.InitializeDeviceState(); + raise_DeviceReset(this, EventArgs.Empty); } diff --git a/ANX.Framework/Graphics/ModelBone.cs b/ANX.Framework/Graphics/ModelBone.cs index 9b529b28..b9326efe 100644 --- a/ANX.Framework/Graphics/ModelBone.cs +++ b/ANX.Framework/Graphics/ModelBone.cs @@ -12,7 +12,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.Tested)] public sealed class ModelBone { public ModelBoneCollection Children { get; internal set; } @@ -21,7 +21,7 @@ namespace ANX.Framework.Graphics public ModelBone Parent { get; internal set; } public Matrix Transform { get; set; } - public ModelBone(string name, Matrix transform, int index) + internal ModelBone(string name, Matrix transform, int index) { this.Name = name; this.Transform = transform; diff --git a/ANX.Framework/Graphics/ModelBoneCollection.cs b/ANX.Framework/Graphics/ModelBoneCollection.cs index b3a992eb..a1337c1b 100644 --- a/ANX.Framework/Graphics/ModelBoneCollection.cs +++ b/ANX.Framework/Graphics/ModelBoneCollection.cs @@ -15,17 +15,48 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("???, AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.Tested)] public sealed class ModelBoneCollection : ReadOnlyCollection { private readonly ModelBone[] modelBones; + public ModelBone this[string boneName] + { + get + { + ModelBone result; + if (TryGetValue(boneName, out result) == false) + throw new KeyNotFoundException(); + + return result; + } + } + internal ModelBoneCollection(ModelBone[] modelBones) : base(modelBones) { this.modelBones = modelBones; } + public bool TryGetValue(string boneName, out ModelBone value) + { + if (String.IsNullOrEmpty(boneName)) + throw new ArgumentNullException("boneName"); + + for (int index = 0; index < Items.Count; index++) + { + ModelBone modelBone = Items[index]; + if (String.Compare(modelBone.Name, boneName, StringComparison.Ordinal) == 0) + { + value = modelBone; + return true; + } + } + + value = null; + return false; + } + public new Enumerator GetEnumerator() { return new Enumerator(this.modelBones); @@ -72,37 +103,5 @@ namespace ANX.Framework.Graphics { } } - - public bool TryGetValue(string boneName, out ModelBone value) - { - if (String.IsNullOrEmpty(boneName)) - throw new ArgumentNullException("boneName"); - - for (int index = 0; index < Items.Count; index++) - { - ModelBone modelBone = Items[index]; - if (String.Compare(modelBone.Name, boneName, StringComparison.Ordinal) == 0) - { - value = modelBone; - return true; - } - } - - value = null; - return false; - } - - public ModelBone this[string boneName] - { - get - { - ModelBone result; - if (TryGetValue(boneName, out result) == false) - throw new KeyNotFoundException(); - - return result; - } - } - } } diff --git a/ANX.Framework/Graphics/ModelEffectCollection.cs b/ANX.Framework/Graphics/ModelEffectCollection.cs index b1ef45fe..b853dc2a 100644 --- a/ANX.Framework/Graphics/ModelEffectCollection.cs +++ b/ANX.Framework/Graphics/ModelEffectCollection.cs @@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class ModelEffectCollection : ReadOnlyCollection { private readonly List effects; @@ -46,20 +46,22 @@ namespace ANX.Framework.Graphics private readonly List wrappedArray; private int position; + public Effect Current + { + get { return this.wrappedArray[this.position]; } + } + + object IEnumerator.Current + { + get { return this.Current; } + } + internal Enumerator(List wrappedArray) { this.wrappedArray = wrappedArray; this.position = -1; } - public Effect Current - { - get - { - return this.wrappedArray[this.position]; - } - } - public bool MoveNext() { this.position++; @@ -79,14 +81,6 @@ namespace ANX.Framework.Graphics public void Dispose() { } - - object IEnumerator.Current - { - get - { - return this.Current; - } - } } } } diff --git a/ANX.Framework/Graphics/ModelMeshCollection.cs b/ANX.Framework/Graphics/ModelMeshCollection.cs index 1d809495..ba995177 100644 --- a/ANX.Framework/Graphics/ModelMeshCollection.cs +++ b/ANX.Framework/Graphics/ModelMeshCollection.cs @@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann, AstrorEnales")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class ModelMeshCollection : ReadOnlyCollection { private readonly ModelMesh[] modelMeshes; diff --git a/ANX.Framework/Graphics/ModelMeshPartCollection.cs b/ANX.Framework/Graphics/ModelMeshPartCollection.cs index 2f96b18d..f3ad0447 100644 --- a/ANX.Framework/Graphics/ModelMeshPartCollection.cs +++ b/ANX.Framework/Graphics/ModelMeshPartCollection.cs @@ -12,7 +12,7 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("GinieDP, Glatzemann")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.InProgress)] public sealed class ModelMeshPartCollection : ReadOnlyCollection { private readonly ModelMeshPart[] modelMeshParts; diff --git a/ANX.Framework/Graphics/SamplerStateCollection.cs b/ANX.Framework/Graphics/SamplerStateCollection.cs index 5952b8a0..cf4099bc 100644 --- a/ANX.Framework/Graphics/SamplerStateCollection.cs +++ b/ANX.Framework/Graphics/SamplerStateCollection.cs @@ -12,19 +12,16 @@ namespace ANX.Framework.Graphics { [PercentageComplete(100)] [Developer("Glatzemann")] - [TestState(TestStateAttribute.TestState.Untested)] + [TestState(TestStateAttribute.TestState.Tested)] public sealed class SamplerStateCollection { private readonly SamplerState[] samplerStates; private readonly GraphicsDevice graphics; - public SamplerStateCollection(GraphicsDevice graphics, int maxSamplers) + internal SamplerStateCollection(GraphicsDevice graphics, int maxSamplers) { this.graphics = graphics; - this.samplerStates = new SamplerState[maxSamplers]; - - for (int i = 0; i < samplerStates.Length; i++) - samplerStates[i] = SamplerState.LinearWrap; + samplerStates = new SamplerState[maxSamplers]; } public SamplerState this[int index] @@ -38,6 +35,12 @@ namespace ANX.Framework.Graphics } set { + if (index < 0 || index >= samplerStates.Length) + throw new ArgumentOutOfRangeException("index"); + + if (value == null) + throw new ArgumentNullException("value"); + if (samplerStates[index] != value) { samplerStates[index] = value; @@ -45,5 +48,11 @@ namespace ANX.Framework.Graphics } } } + + internal void InitializeDeviceState() + { + for (int i = 0; i < samplerStates.Length; i++) + samplerStates[i] = SamplerState.LinearWrap; + } } } diff --git a/ANX.Framework/NonXNA/Reflection/AssemblyLoader.cs b/ANX.Framework/NonXNA/Reflection/AssemblyLoader.cs index 6bc4d0a1..ea58daec 100644 --- a/ANX.Framework/NonXNA/Reflection/AssemblyLoader.cs +++ b/ANX.Framework/NonXNA/Reflection/AssemblyLoader.cs @@ -33,6 +33,14 @@ namespace ANX.Framework.NonXNA.Reflection "Sce.PlayStation.Core.dll", "wrap_oal.dll", "OpenAL32.dll", + "nunit.framework.dll", + "OggUtils.dll", + "Microsoft.Research.Kinect.dll", + "Microsoft.Xna.Framework.Graphics.dll", + "Microsoft.Xna.Framework.Game.dll", + "Microsoft.Xna.Framework.Content.Pipeline.dll", + "OggUtils.dll", + "OggUtils.dll", }; #endregion diff --git a/ANX.Framework_Linux.sln b/ANX.Framework_Linux.sln index 9d8f6151..8a60475e 100644 --- a/ANX.Framework_Linux.sln +++ b/ANX.Framework_Linux.sln @@ -248,17 +248,21 @@ Global {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86 {9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86 diff --git a/ANX.Framework_PSVita.sln b/ANX.Framework_PSVita.sln index 390afc79..674a41cb 100644 --- a/ANX.Framework_PSVita.sln +++ b/ANX.Framework_PSVita.sln @@ -248,17 +248,21 @@ Global {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86 {9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86 diff --git a/ANX.Framework_WindowsMetro.sln b/ANX.Framework_WindowsMetro.sln index 142984a7..18c19101 100644 --- a/ANX.Framework_WindowsMetro.sln +++ b/ANX.Framework_WindowsMetro.sln @@ -248,17 +248,21 @@ Global {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86 + {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86 {ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86 {9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86