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 948875e8..897a6cd2 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj @@ -34,6 +34,8 @@ + + @@ -165,6 +167,11 @@ + + + + + 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 ec6e611e..317d83ce 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj @@ -34,6 +34,8 @@ + + @@ -165,6 +167,11 @@ + + + + + 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 cc821926..c28edd93 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_WindowsMetro.csproj @@ -36,6 +36,8 @@ + + @@ -167,6 +169,11 @@ + + + + + diff --git a/ANX.Framework.sln b/ANX.Framework.sln index 4222bc4b..0557861a 100644 --- a/ANX.Framework.sln +++ b/ANX.Framework.sln @@ -179,6 +179,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnxSampleBrowser", "Tools\A EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNBInspector", "Tools\XNBInspector\XNBInspector.csproj", "{14B39F89-C9B0-407E-877A-B515C985E96E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.PsVita", "InputSystems\ANX.InputDevices.PsVita\ANX.InputDevices.PsVita.csproj", "{566293A4-1187-4289-A28C-C74B499D46AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -648,6 +650,7 @@ Global {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|x86.ActiveCfg = Release|Any CPU {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.Build.0 = Debug|x86 {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.Build.0 = Debug|x86 {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.ActiveCfg = Debug|x86 @@ -658,6 +661,7 @@ Global {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.ActiveCfg = Release|x86 {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.Build.0 = Release|x86 {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.Build.0 = Debug|x86 {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.Build.0 = Debug|x86 {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.ActiveCfg = Debug|x86 @@ -668,6 +672,7 @@ Global {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.ActiveCfg = Release|x86 {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.Build.0 = Release|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.Build.0 = Debug|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.Build.0 = Debug|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.ActiveCfg = Debug|x86 @@ -677,6 +682,16 @@ Global {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.Build.0 = Release|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.ActiveCfg = Release|x86 {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.Build.0 = Release|x86 + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -718,6 +733,7 @@ Global {5CA3CDF5-4D2C-42AC-AD08-641BD3992B75} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {E5D69E75-D77C-493F-BBDA-6F9E73B82549} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {5040A9C7-6DEC-4613-8586-A598C4070B35} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} + {566293A4-1187-4289-A28C-C74B499D46AA} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF} diff --git a/ANX.Framework/ANX.Framework.csproj b/ANX.Framework/ANX.Framework.csproj index 7656bdb5..a818b4ad 100644 --- a/ANX.Framework/ANX.Framework.csproj +++ b/ANX.Framework/ANX.Framework.csproj @@ -419,6 +419,8 @@ + + diff --git a/ANX.Framework/ANX.Framework_Linux.csproj b/ANX.Framework/ANX.Framework_Linux.csproj index 1dda9aea..f228f00e 100644 --- a/ANX.Framework/ANX.Framework_Linux.csproj +++ b/ANX.Framework/ANX.Framework_Linux.csproj @@ -419,6 +419,8 @@ + + diff --git a/ANX.Framework/ANX.Framework_PSVita.csproj b/ANX.Framework/ANX.Framework_PSVita.csproj index 7d3d85ff..400f9ee9 100644 --- a/ANX.Framework/ANX.Framework_PSVita.csproj +++ b/ANX.Framework/ANX.Framework_PSVita.csproj @@ -420,6 +420,8 @@ + + diff --git a/ANX.Framework/ANX.Framework_WindowsMetro.csproj b/ANX.Framework/ANX.Framework_WindowsMetro.csproj index 519d6014..e4787cb7 100644 --- a/ANX.Framework/ANX.Framework_WindowsMetro.csproj +++ b/ANX.Framework/ANX.Framework_WindowsMetro.csproj @@ -422,6 +422,8 @@ + + diff --git a/ANX.Framework/Input/GamePadCapabilities.cs b/ANX.Framework/Input/GamePadCapabilities.cs index f2a91d18..e426f237 100644 --- a/ANX.Framework/Input/GamePadCapabilities.cs +++ b/ANX.Framework/Input/GamePadCapabilities.cs @@ -1,10 +1,3 @@ -#region Using Statements -using System; -using System.IO; -using ANX.Framework.NonXNA; - -#endregion // Using Statements - // 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 @@ -13,37 +6,6 @@ namespace ANX.Framework.Input { public struct GamePadCapabilities { - //public GamePadCapabilities(GamePadType gamePadType, bool hasAButton, bool hasBackButton, bool hasBButton, bool hasBigButton, bool hasDPadDownButton, bool hasDPadLeftButton, bool hasDPadRightButton, bool hasDPadUpButton, bool hasLeftShoulderButton, bool hasLeftStickButton, bool hasLeftTrigger, bool hasLeftVibrationMotor, bool hasLeftXThumbStick, bool hasLeftYThumbStick, bool hasRightShoulderButton, bool hasRightStickButton, bool hasRightVibrationMotor, bool hasRightTrigger, bool hasRightXThumbStick, bool hasRightYThumbStick, bool hasStartButton, bool hasVoiceSupport, bool hasXButton, bool hasYButton, bool isConnected) - //{ - // this.gamePadType = gamePadType; - // this.hasAButton = hasAButton; - // this.hasBackButton = hasBackButton; - // this.hasBButton = hasBButton; - // this.hasBigButton = hasBigButton; - // this.hasDPadDownButton = hasDPadDownButton; - // this.hasDPadLeftButton= hasDPadLeftButton; - // this.hasDPadRightButton = hasDPadRightButton; - // this.hasDPadUpButton = hasDPadUpButton; - // this.hasLeftShoulderButton=hasLeftShoulderButton; - // this.hasLeftStickButton=hasLeftStickButton; - // this.hasLeftTrigger=hasLeftTrigger; - // this.hasLeftVibrationMotor=hasLeftVibrationMotor; - // this.hasLeftXThumbStick=hasLeftXThumbStick; - // this.hasLeftYThumbStick=hasLeftYThumbStick; - // this.hasRightShoulderButton=hasRightShoulderButton; - // this.hasRightStickButton=hasRightStickButton; - // this.hasRightVibrationMotor=hasRightVibrationMotor; - // this.hasRightTrigger=hasRightTrigger; - // this.hasRightXThumbStick=hasRightXThumbStick; - // this.hasRightYThumbStick=hasRightYThumbStick; - // this.hasStartButton=hasStartButton; - // this.hasVoiceSupport=hasVoiceSupport; - // this.hasXButton=hasXButton; - // this.hasYButton=hasYButton; - // this.isConnected=isConnected; - - //} - public GamePadType GamePadType { get; @@ -54,7 +16,6 @@ namespace ANX.Framework.Input { get; internal set; - } public bool HasBackButton diff --git a/ANX.Framework/Input/Touch/GestureSample.cs b/ANX.Framework/Input/Touch/GestureSample.cs index daeab893..d0151dc1 100644 --- a/ANX.Framework/Input/Touch/GestureSample.cs +++ b/ANX.Framework/Input/Touch/GestureSample.cs @@ -1,8 +1,5 @@ -#region Using Statements using System; -#endregion // Using Statements - // 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 @@ -11,17 +8,68 @@ namespace ANX.Framework.Input.Touch { public struct GestureSample { - #region Private Members + #region Private private GestureType gestureType; private TimeSpan timestamp; private Vector2 position; private Vector2 position2; private Vector2 delta; private Vector2 delta2; + #endregion - #endregion // Private Members + #region Public + public Vector2 Delta + { + get + { + return this.delta; + } + } - public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, Vector2 position2, Vector2 delta, Vector2 delta2) + public Vector2 Delta2 + { + get + { + return this.delta2; + } + } + + public GestureType GestureType + { + get + { + return this.gestureType; + } + } + + public Vector2 Position + { + get + { + return this.position; + } + } + + public Vector2 Position2 + { + get + { + return this.position2; + } + } + + public TimeSpan Timestamp + { + get + { + return this.timestamp; + } + } + #endregion + + #region Constructor + public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, + Vector2 position2, Vector2 delta, Vector2 delta2) { this.gestureType = gestureType; this.timestamp = timestamp; @@ -30,53 +78,6 @@ namespace ANX.Framework.Input.Touch this.delta = delta; this.delta2 = delta2; } - - public Vector2 Delta - { - get - { - return this.delta; - } - } - - public Vector2 Delta2 - { - get - { - return this.delta2; - } - } - - public GestureType GestureType - { - get - { - return this.gestureType; - } - } - - public Vector2 Position - { - get - { - return this.position; - } - } - - public Vector2 Position2 - { - get - { - return this.position2; - } - } - - public TimeSpan Timestamp - { - get - { - return this.timestamp; - } - } + #endregion } } diff --git a/ANX.Framework/Input/Touch/TouchCollection.cs b/ANX.Framework/Input/Touch/TouchCollection.cs index aa1b7870..cf806e78 100644 --- a/ANX.Framework/Input/Touch/TouchCollection.cs +++ b/ANX.Framework/Input/Touch/TouchCollection.cs @@ -1,9 +1,6 @@ -#region Using Statements using System; -using System.Collections.Generic; using System.Collections; - -#endregion // Using Statements +using System.Collections.Generic; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -11,148 +8,195 @@ using System.Collections; namespace ANX.Framework.Input.Touch { - public struct TouchCollection : IList, ICollection, IEnumerable, IEnumerable - { - public TouchCollection(TouchLocation[] touches) - { - throw new NotImplementedException(); - } + public struct TouchCollection : IList, ICollection, IEnumerable, IEnumerable + { + #region Enumerator (helper struct) + public struct Enumerator : IEnumerator, IDisposable, IEnumerator + { + private TouchCollection collection; + private int position; - public int IndexOf(TouchLocation item) - { - throw new NotImplementedException(); - } + public TouchLocation Current + { + get + { + return this.collection[this.position]; + } + } - public void Insert(int index, TouchLocation item) - { - throw new NotImplementedException(); - } + object IEnumerator.Current + { + get + { + return this.Current; + } + } - public void RemoveAt(int index) - { - throw new NotImplementedException(); - } + internal Enumerator(TouchCollection collection) + { + this.collection = collection; + this.position = -1; + } - public TouchLocation this[int index] - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } + public bool MoveNext() + { + this.position++; + if (this.position >= this.collection.Count) + { + this.position = this.collection.Count; + return false; + } + return true; + } - public void Add(TouchLocation item) - { - throw new NotImplementedException(); - } + void IEnumerator.Reset() + { + this.position = -1; + } - public void Clear() - { - throw new NotImplementedException(); - } + public void Dispose() + { + } + } + #endregion - public bool Contains(TouchLocation item) - { - throw new NotImplementedException(); - } + #region Private + private List locations; + #endregion - public void CopyTo(TouchLocation[] array, int arrayIndex) - { - throw new NotImplementedException(); - } + #region Public (TODO) + public TouchLocation this[int index] + { + get + { + return locations[index]; + } + set + { + locations[index] = value; + } + } - public bool FindById(int id, out TouchLocation touchLocation) - { - throw new NotImplementedException(); - } + public int Count + { + get + { + return locations.Count; + } + } - public int Count - { - get { throw new NotImplementedException(); } - } + public bool IsConnected + { + get + { + throw new NotImplementedException(); + } + } - public bool IsConnected - { - get - { - throw new NotImplementedException(); - } - } + public bool IsReadOnly + { + get + { + throw new NotImplementedException(); + } + } + #endregion - public bool IsReadOnly - { - get { throw new NotImplementedException(); } - } + #region Constructor + public TouchCollection(TouchLocation[] touches) + { + locations = new List(touches); + } + #endregion - public bool Remove(TouchLocation item) - { - throw new NotImplementedException(); - } + #region IndexOf + public int IndexOf(TouchLocation item) + { + return locations.IndexOf(item); + } + #endregion - public Enumerator GetEnumerator() - { - return new Enumerator(this); - } + #region Insert + public void Insert(int index, TouchLocation item) + { + locations.Insert(index, item); + } + #endregion - IEnumerator IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } + #region RemoveAt + public void RemoveAt(int index) + { + locations.RemoveAt(index); + } + #endregion - IEnumerator IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } + #region Add + public void Add(TouchLocation item) + { + locations.Add(item); + } + #endregion - public struct Enumerator : IEnumerator, IDisposable, IEnumerator - { - private TouchCollection collection; - private int position; - internal Enumerator(TouchCollection collection) - { - this.collection = collection; - this.position = -1; - } + #region Clear + public void Clear() + { + locations.Clear(); + } + #endregion - public TouchLocation Current - { - get - { - return this.collection[this.position]; - } - } - public bool MoveNext() - { - this.position++; - if (this.position >= this.collection.Count) - { - this.position = this.collection.Count; - return false; - } - return true; - } + #region Contains + public bool Contains(TouchLocation item) + { + return locations.Contains(item); + } + #endregion - void IEnumerator.Reset() - { - this.position = -1; - } + #region CopyTo + public void CopyTo(TouchLocation[] array, int arrayIndex) + { + locations.CopyTo(array, arrayIndex); + } + #endregion - public void Dispose() - { - } + #region FindById + public bool FindById(int id, out TouchLocation touchLocation) + { + foreach (var location in locations) + { + if (location.Id == id) + { + touchLocation = location; + return true; + } + } - object IEnumerator.Current - { - get - { - return this.Current; - } - } - } + touchLocation = default(TouchLocation); + return false; + } + #endregion - } + #region Remove + public bool Remove(TouchLocation item) + { + return locations.Remove(item); + } + #endregion + + #region GetEnumerator + public Enumerator GetEnumerator() + { + return new Enumerator(this); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return new Enumerator(this); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return new Enumerator(this); + } + #endregion + } } diff --git a/ANX.Framework/Input/Touch/TouchLocation.cs b/ANX.Framework/Input/Touch/TouchLocation.cs index fe617aa3..da9f9ea1 100644 --- a/ANX.Framework/Input/Touch/TouchLocation.cs +++ b/ANX.Framework/Input/Touch/TouchLocation.cs @@ -11,16 +11,42 @@ namespace ANX.Framework.Input.Touch { public struct TouchLocation : IEquatable { - #region Private members + #region Private private int id; private TouchLocationState prevState; private Vector2 prevPos; private TouchLocationState state; private Vector2 pos; + #endregion - #endregion // Private members + #region Public + public int Id + { + get + { + return this.id; + } + } - public TouchLocation(int id, TouchLocationState state, Vector2 position) + public Vector2 Position + { + get + { + return this.pos; + } + } + + public TouchLocationState State + { + get + { + return this.state; + } + } + #endregion + + #region Constructor + public TouchLocation(int id, TouchLocationState state, Vector2 position) { this.id = id; this.state = state; @@ -29,7 +55,8 @@ namespace ANX.Framework.Input.Touch this.prevPos = Vector2.Zero; } - public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState, Vector2 previousPosition) + public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState, + Vector2 previousPosition) { this.id = id; this.state = state; @@ -37,8 +64,10 @@ namespace ANX.Framework.Input.Touch this.prevState = previousState; this.prevPos = previousPosition; } + #endregion - public bool TryGetPreviousLocation(out TouchLocation previousLocation) + #region TryGetPreviousLocation + public bool TryGetPreviousLocation(out TouchLocation previousLocation) { if (this.prevState == TouchLocationState.Invalid) { @@ -59,20 +88,26 @@ namespace ANX.Framework.Input.Touch return true; } - + #endregion + + #region ToString public override string ToString() { return string.Format("{{Position:{0}}}", this.pos); } - + #endregion + + #region GetHashCode public override int GetHashCode() { return this.id.GetHashCode() + this.pos.X.GetHashCode() + this.pos.Y.GetHashCode(); } - + #endregion + + #region Equals public override bool Equals(Object other) { - if (other != null && other.GetType() == this.GetType()) + if (other != null && other is TouchLocation) { return this == (TouchLocation)other; } @@ -84,7 +119,9 @@ namespace ANX.Framework.Input.Touch { return this.id == other.id && this.pos == other.pos && this.prevPos == other.prevPos; } + #endregion + #region Operators public static bool operator ==(TouchLocation lhs, TouchLocation rhs) { return lhs.id == rhs.id && lhs.pos == rhs.pos && lhs.prevPos == rhs.prevPos; @@ -94,29 +131,6 @@ namespace ANX.Framework.Input.Touch { return lhs.id != rhs.id || lhs.pos != rhs.pos || lhs.prevPos != rhs.prevPos; } - - public int Id - { - get - { - return this.id; - } - } - - public Vector2 Position - { - get - { - return this.pos; - } - } - - public TouchLocationState State - { - get - { - return this.state; - } - } + #endregion } } diff --git a/ANX.Framework/Input/Touch/TouchPanel.cs b/ANX.Framework/Input/Touch/TouchPanel.cs index 560d5b52..12edf5a3 100644 --- a/ANX.Framework/Input/Touch/TouchPanel.cs +++ b/ANX.Framework/Input/Touch/TouchPanel.cs @@ -1,4 +1,6 @@ using System; +using ANX.Framework.NonXNA; +using ANX.Framework.NonXNA.InputSystem; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -8,15 +10,20 @@ namespace ANX.Framework.Input.Touch { public static class TouchPanel { + #region Private + private static ITouchPanel nativeTouchPanel; + #endregion + + #region Public public static GestureType EnabledGestures { get { - throw new NotImplementedException(); + return nativeTouchPanel.EnabledGestures; } set { - throw new NotImplementedException(); + nativeTouchPanel.EnabledGestures = value; } } @@ -24,7 +31,7 @@ namespace ANX.Framework.Input.Touch { get { - throw new NotImplementedException(); + return nativeTouchPanel.IsGestureAvailable; } } @@ -32,11 +39,11 @@ namespace ANX.Framework.Input.Touch { get { - throw new NotImplementedException(); + return nativeTouchPanel.WindowHandle; } set { - throw new NotImplementedException(); + nativeTouchPanel.WindowHandle = value; } } @@ -44,11 +51,11 @@ namespace ANX.Framework.Input.Touch { get { - throw new NotImplementedException(); + return nativeTouchPanel.DisplayOrientation; } set { - throw new NotImplementedException(); + nativeTouchPanel.DisplayOrientation = value; } } @@ -56,11 +63,11 @@ namespace ANX.Framework.Input.Touch { get { - throw new NotImplementedException(); + return nativeTouchPanel.DisplayWidth; } set { - throw new NotImplementedException(); + nativeTouchPanel.DisplayWidth = value; } } @@ -68,27 +75,41 @@ namespace ANX.Framework.Input.Touch { get { - throw new NotImplementedException(); + return nativeTouchPanel.DisplayHeight; } set { - throw new NotImplementedException(); + nativeTouchPanel.DisplayHeight = value; } } + #endregion + #region Constructor + static TouchPanel() + { + nativeTouchPanel = AddInSystemFactory.Instance.GetDefaultCreator().TouchPanel; + } + #endregion + + #region GetCapabilities public static TouchPanelCapabilities GetCapabilities() { - throw new NotImplementedException(); + return nativeTouchPanel.GetCapabilities(); } + #endregion + #region ReadGesture public static GestureSample ReadGesture() { - throw new NotImplementedException(); + return nativeTouchPanel.ReadGesture(); } + #endregion + #region GetState public static TouchCollection GetState() { - throw new NotImplementedException(); + return nativeTouchPanel.GetState(); } + #endregion } } diff --git a/ANX.Framework/Input/Touch/TouchPanelCapabilities.cs b/ANX.Framework/Input/Touch/TouchPanelCapabilities.cs index 7d49da2a..65e12834 100644 --- a/ANX.Framework/Input/Touch/TouchPanelCapabilities.cs +++ b/ANX.Framework/Input/Touch/TouchPanelCapabilities.cs @@ -11,7 +11,6 @@ namespace ANX.Framework.Input.Touch { public struct TouchPanelCapabilities { - public bool IsConnected { get; @@ -23,6 +22,5 @@ namespace ANX.Framework.Input.Touch get; set; } - } } diff --git a/ANX.Framework/NonXNA/InputDeviceFactory.cs b/ANX.Framework/NonXNA/InputDeviceFactory.cs index a9fe51f5..12988d6b 100644 --- a/ANX.Framework/NonXNA/InputDeviceFactory.cs +++ b/ANX.Framework/NonXNA/InputDeviceFactory.cs @@ -69,22 +69,24 @@ namespace ANX.Framework.NonXNA #region Constructor private InputDeviceFactory() { - deviceCreators = - new Dictionary>(); - - deviceCreators.Add(typeof(IGamePadCreator), - new Dictionary()); - deviceCreators.Add(typeof(IKeyboardCreator), - new Dictionary()); - deviceCreators.Add(typeof(IMouseCreator), - new Dictionary()); + deviceCreators = new Dictionary>(); + RegisterCreatorType(); + RegisterCreatorType(); + RegisterCreatorType(); + RegisterCreatorType(); #if XNAEXT - deviceCreators.Add(typeof(IMotionSensingDeviceCreator), - new Dictionary()); + RegisterCreatorType(); #endif } #endregion + #region RegisterCreatorType + private void RegisterCreatorType() + { + deviceCreators.Add(typeof(T), new Dictionary()); + } + #endregion + #region AddCreator public void AddCreator(Type deviceType, IInputDeviceCreator creator) { @@ -93,9 +95,8 @@ namespace ANX.Framework.NonXNA Type deviceInterface = TypeHelper.GetInterfacesFrom(deviceType)[0]; if (deviceCreators[deviceInterface].ContainsKey(creatorName)) { - throw new Exception("Duplicate " + deviceType.Name + - " found. A GamePadCreator with the name '" + creator.Name + - "' was already registered."); + throw new Exception("Duplicate " + deviceType.Name + " found. A " + deviceType.Name + + " with the name '" + creator.Name + "' was already registered."); } deviceCreators[deviceInterface].Add(creatorName, creator); @@ -106,68 +107,43 @@ namespace ANX.Framework.NonXNA } #endregion + #region GetDefaultTouchPanel + public ITouchPanel GetDefaultTouchPanel() + { + ValidateWindowHandle(); + + var touchPanel = GetDefaultCreator().CreateTouchPanelInstance(); + touchPanel.WindowHandle = this.windowHandle; + return touchPanel; + } + #endregion + #region GetDefaultGamePad public IGamePad GetDefaultGamePad() { - //TODO: this is a very basic implementation only which needs some more work - - if (this.deviceCreators[typeof(IGamePadCreator)].Count > 0) - { - IInputDeviceCreator creator = deviceCreators[ - typeof(IGamePadCreator)].Values.First(); - return ((IGamePadCreator)creator).CreateGamePadInstance(); - } - - throw new Exception("Unable to create instance of GamePad because no GamePadCreator was registered."); + return GetDefaultCreator().CreateGamePadInstance(); } #endregion #region GetDefaultMouse public IMouse GetDefaultMouse() { - //TODO: this is a very basic implementation only which needs some more work + ValidateWindowHandle(); - if (this.WindowHandle == null || - this.WindowHandle == IntPtr.Zero) - { - throw new Exception("Unable to create a mouse instance because the WindowHandle was not set."); - } - - if (this.deviceCreators[typeof(IMouseCreator)].Count > 0) - { - IInputDeviceCreator creator = deviceCreators[ - typeof(IMouseCreator)].Values.First(); - IMouse mouse = ((IMouseCreator)creator).CreateMouseInstance(); - mouse.WindowHandle = this.windowHandle; - return mouse; - } - - throw new Exception("Unable to create instance of Mouse because no MouseCreator was registered."); + var mouse = GetDefaultCreator().CreateMouseInstance(); + mouse.WindowHandle = this.windowHandle; + return mouse; } #endregion #region GetDefaultKeyboard public IKeyboard GetDefaultKeyboard() { - //TODO: this is a very basic implementation only which needs some more work + ValidateWindowHandle(); - if (this.WindowHandle == null || - this.WindowHandle == IntPtr.Zero) - { - throw new Exception("Unable to create a keyboard instance because the WindowHandle was not set."); - } - - if (this.deviceCreators[typeof(IKeyboardCreator)].Count > 0) - { - IInputDeviceCreator creator = deviceCreators[ - typeof(IKeyboardCreator)].Values.First(); - IKeyboard keyboard = - ((IKeyboardCreator)creator).CreateKeyboardInstance(); - keyboard.WindowHandle = this.windowHandle; - return keyboard; - } - - throw new Exception("Unable to create instance of Keyboard because no KeyboardCreator was registered."); + var keyboard = GetDefaultCreator().CreateKeyboardInstance(); + keyboard.WindowHandle = this.windowHandle; + return keyboard; } #endregion @@ -175,20 +151,34 @@ namespace ANX.Framework.NonXNA #if XNAEXT public IMotionSensingDevice GetDefaultMotionSensingDevice() { - //TODO: this is a very basic implementation only which needs some more work - - if (this.deviceCreators[typeof(IMotionSensingDeviceCreator)].Count > 0) - { - IInputDeviceCreator creator = deviceCreators[ - typeof(IMotionSensingDeviceCreator)].Values - .First(); - return ((IMotionSensingDeviceCreator)creator) - .CreateMotionSensingDeviceInstance(); - } - - throw new Exception("Unable to create instance of MotionSensingDevice because no MotionSensingDeviceCreator was registered."); + return GetDefaultCreator().CreateMotionSensingDeviceInstance(); } #endif #endregion + + #region GetDefaultCreator + private T GetDefaultCreator() where T : IInputDeviceCreator + { + Type creatorType = typeof(T); + if (deviceCreators.ContainsKey(creatorType)) + { + var creators = deviceCreators[creatorType]; + if (creators.Count > 0) + { + return (T)creators.Values.First(); + } + } + + throw new Exception("Unable to find a default creator for type " + creatorType); + } + #endregion + + #region ValidateWindowHandle + private void ValidateWindowHandle() + { + if (windowHandle == IntPtr.Zero) + throw new Exception("Unable to create a mouse instance because the WindowHandle was not set."); + } + #endregion } } diff --git a/ANX.Framework/NonXNA/InputSystem/IInputSystemCreator.cs b/ANX.Framework/NonXNA/InputSystem/IInputSystemCreator.cs index ca202dd6..e933cc65 100644 --- a/ANX.Framework/NonXNA/InputSystem/IInputSystemCreator.cs +++ b/ANX.Framework/NonXNA/InputSystem/IInputSystemCreator.cs @@ -19,7 +19,9 @@ namespace ANX.Framework.NonXNA IMouse Mouse { get; } - IKeyboard Keyboard { get; } + IKeyboard Keyboard { get; } + + ITouchPanel TouchPanel { get; } #if XNAEXT IMotionSensingDevice MotionSensingDevice { get; } diff --git a/ANX.Framework/NonXNA/InputSystem/IKeyboard.cs b/ANX.Framework/NonXNA/InputSystem/IKeyboard.cs index c6599c11..4c6a9edd 100644 --- a/ANX.Framework/NonXNA/InputSystem/IKeyboard.cs +++ b/ANX.Framework/NonXNA/InputSystem/IKeyboard.cs @@ -1,9 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using ANX.Framework.Input; +// 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.NonXNA { public interface IKeyboard : IDisposable diff --git a/ANX.Framework/NonXNA/InputSystem/IMouse.cs b/ANX.Framework/NonXNA/InputSystem/IMouse.cs index 5b96a5c1..aac75477 100644 --- a/ANX.Framework/NonXNA/InputSystem/IMouse.cs +++ b/ANX.Framework/NonXNA/InputSystem/IMouse.cs @@ -1,11 +1,6 @@ -#region Using Statements using System; -using System.IO; -using ANX.Framework.NonXNA; using ANX.Framework.Input; -#endregion // Using Statements - // 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 diff --git a/ANX.Framework/NonXNA/InputSystem/ITouchPanel.cs b/ANX.Framework/NonXNA/InputSystem/ITouchPanel.cs new file mode 100644 index 00000000..78cd8596 --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/ITouchPanel.cs @@ -0,0 +1,51 @@ +using System; +using ANX.Framework.Input.Touch; + +// 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.NonXNA +{ + public interface ITouchPanel : IDisposable + { + GestureType EnabledGestures + { + get; + set; + } + + bool IsGestureAvailable + { + get; + } + + IntPtr WindowHandle + { + get; + set; + } + + DisplayOrientation DisplayOrientation + { + get; + set; + } + + int DisplayWidth + { + get; + set; + } + + int DisplayHeight + { + get; + set; + } + + TouchPanelCapabilities GetCapabilities(); + GestureSample ReadGesture(); + TouchCollection GetState(); + } +} diff --git a/ANX.Framework/NonXNA/InputSystem/ITouchPanelCreator.cs b/ANX.Framework/NonXNA/InputSystem/ITouchPanelCreator.cs new file mode 100644 index 00000000..a4ce04d0 --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/ITouchPanelCreator.cs @@ -0,0 +1,13 @@ +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.NonXNA.InputSystem +{ + public interface ITouchPanelCreator : IInputDeviceCreator + { + ITouchPanel CreateTouchPanelInstance(); + } +} diff --git a/ANX.Framework/Properties/AssemblyInfo.cs b/ANX.Framework/Properties/AssemblyInfo.cs index b7b0bc1b..9df749d3 100644 --- a/ANX.Framework/Properties/AssemblyInfo.cs +++ b/ANX.Framework/Properties/AssemblyInfo.cs @@ -43,6 +43,7 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo("ANX.Framework.Windows.XInput")] [assembly: InternalsVisibleTo("ANX.Framework.Windows.XAudio")] [assembly: InternalsVisibleTo("ANX.InputSystem.Recording")] +[assembly: InternalsVisibleTo("ANX.InputDevices.PsVita")] [assembly: InternalsVisibleTo("ANX.PlatformSystem.Windows")] [assembly: InternalsVisibleTo("ANX.PlatformSystem.Linux")] [assembly: InternalsVisibleTo("ANX.PlatformSystem.Metro")] diff --git a/ANX.Framework_Linux.sln b/ANX.Framework_Linux.sln index 93ab6073..7d9bc7f2 100644 --- a/ANX.Framework_Linux.sln +++ b/ANX.Framework_Linux.sln @@ -13,6 +13,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RenderSystems", "RenderSystems", "{D421509A-9AE3-4D7E-881B-EAFED598B028}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B0DD48B-3912-4F33-AF3F-691AF02B73F9}" + ProjectSection(SolutionItems) = preProject + Samples\SampleCatalog.xml = Samples\SampleCatalog.xml + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VertexIndexBuffer", "Samples\VertexIndexBuffer\VertexIndexBuffer_Linux.csproj", "{F945515B-394D-4ED4-80E0-98EB59B69D24}" EndProject @@ -170,6 +173,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metro", "Metro", "{32B91ACB shader\Metro\SpriteBatch.fx = shader\Metro\SpriteBatch.fx EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContentBuilder", "Tools\ContentBuilder\ContentBuilder.csproj", "{10F7894D-E8B5-4DCA-BB08-5C99FA792388}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnxSampleBrowser", "Tools\AnxSampleBrowser\AnxSampleBrowser.csproj", "{938D5F88-B888-4B04-BEEE-EE701FBA51EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNBInspector", "Tools\XNBInspector\XNBInspector.csproj", "{14B39F89-C9B0-407E-877A-B515C985E96E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.PsVita", "InputSystems\ANX.InputDevices.PsVita\ANX.InputDevices.PsVita_Linux.csproj", "{566293A4-1187-4289-A28C-C74B499D46AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -638,6 +649,49 @@ Global {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|x86.ActiveCfg = Release|Any CPU + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Any CPU.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.Build.0 = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Any CPU.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Any CPU.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.Build.0 = Release|x86 + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -649,6 +703,9 @@ Global {9588B0C3-E03A-4C71-89A4-2C8685D426F1} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {F9177943-1590-49AE-987D-D6FAE30D96DD} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {47B802CC-069D-431E-BF15-E574EDD3BA5D} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {10F7894D-E8B5-4DCA-BB08-5C99FA792388} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {938D5F88-B888-4B04-BEEE-EE701FBA51EF} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {14B39F89-C9B0-407E-877A-B515C985E96E} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {5BE49183-2F6F-4527-AC90-D816911FCF90} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {B30DE9C2-0926-46B6-8351-9AF276C472D5} = {D421509A-9AE3-4D7E-881B-EAFED598B028} @@ -676,6 +733,7 @@ Global {5CA3CDF5-4D2C-42AC-AD08-641BD3992B75} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {E5D69E75-D77C-493F-BBDA-6F9E73B82549} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {5040A9C7-6DEC-4613-8586-A598C4070B35} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} + {566293A4-1187-4289-A28C-C74B499D46AA} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF} diff --git a/ANX.Framework_PSVita.sln b/ANX.Framework_PSVita.sln index 0d064114..aec59ffa 100644 --- a/ANX.Framework_PSVita.sln +++ b/ANX.Framework_PSVita.sln @@ -13,6 +13,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RenderSystems", "RenderSystems", "{D421509A-9AE3-4D7E-881B-EAFED598B028}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B0DD48B-3912-4F33-AF3F-691AF02B73F9}" + ProjectSection(SolutionItems) = preProject + Samples\SampleCatalog.xml = Samples\SampleCatalog.xml + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VertexIndexBuffer", "Samples\VertexIndexBuffer\VertexIndexBuffer_PSVita.csproj", "{F945515B-394D-4ED4-80E0-98EB59B69D24}" EndProject @@ -170,6 +173,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metro", "Metro", "{32B91ACB shader\Metro\SpriteBatch.fx = shader\Metro\SpriteBatch.fx EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContentBuilder", "Tools\ContentBuilder\ContentBuilder.csproj", "{10F7894D-E8B5-4DCA-BB08-5C99FA792388}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnxSampleBrowser", "Tools\AnxSampleBrowser\AnxSampleBrowser.csproj", "{938D5F88-B888-4B04-BEEE-EE701FBA51EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNBInspector", "Tools\XNBInspector\XNBInspector.csproj", "{14B39F89-C9B0-407E-877A-B515C985E96E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.PsVita", "InputSystems\ANX.InputDevices.PsVita\ANX.InputDevices.PsVita_PSVita.csproj", "{566293A4-1187-4289-A28C-C74B499D46AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -638,6 +649,49 @@ Global {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|x86.ActiveCfg = Release|Any CPU + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Any CPU.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.Build.0 = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Any CPU.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Any CPU.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.Build.0 = Release|x86 + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -649,6 +703,9 @@ Global {9588B0C3-E03A-4C71-89A4-2C8685D426F1} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {F9177943-1590-49AE-987D-D6FAE30D96DD} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {47B802CC-069D-431E-BF15-E574EDD3BA5D} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {10F7894D-E8B5-4DCA-BB08-5C99FA792388} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {938D5F88-B888-4B04-BEEE-EE701FBA51EF} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {14B39F89-C9B0-407E-877A-B515C985E96E} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {5BE49183-2F6F-4527-AC90-D816911FCF90} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {B30DE9C2-0926-46B6-8351-9AF276C472D5} = {D421509A-9AE3-4D7E-881B-EAFED598B028} @@ -676,6 +733,7 @@ Global {5CA3CDF5-4D2C-42AC-AD08-641BD3992B75} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {E5D69E75-D77C-493F-BBDA-6F9E73B82549} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {5040A9C7-6DEC-4613-8586-A598C4070B35} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} + {566293A4-1187-4289-A28C-C74B499D46AA} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF} diff --git a/ANX.Framework_WindowsMetro.sln b/ANX.Framework_WindowsMetro.sln index 9b44e290..2f62a96f 100644 --- a/ANX.Framework_WindowsMetro.sln +++ b/ANX.Framework_WindowsMetro.sln @@ -13,6 +13,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RenderSystems", "RenderSystems", "{D421509A-9AE3-4D7E-881B-EAFED598B028}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B0DD48B-3912-4F33-AF3F-691AF02B73F9}" + ProjectSection(SolutionItems) = preProject + Samples\SampleCatalog.xml = Samples\SampleCatalog.xml + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VertexIndexBuffer", "Samples\VertexIndexBuffer\VertexIndexBuffer_WindowsMetro.csproj", "{F945515B-394D-4ED4-80E0-98EB59B69D24}" EndProject @@ -170,6 +173,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metro", "Metro", "{32B91ACB shader\Metro\SpriteBatch.fx = shader\Metro\SpriteBatch.fx EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContentBuilder", "Tools\ContentBuilder\ContentBuilder.csproj", "{10F7894D-E8B5-4DCA-BB08-5C99FA792388}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnxSampleBrowser", "Tools\AnxSampleBrowser\AnxSampleBrowser.csproj", "{938D5F88-B888-4B04-BEEE-EE701FBA51EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNBInspector", "Tools\XNBInspector\XNBInspector.csproj", "{14B39F89-C9B0-407E-877A-B515C985E96E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.PsVita", "InputSystems\ANX.InputDevices.PsVita\ANX.InputDevices.PsVita_WindowsMetro.csproj", "{566293A4-1187-4289-A28C-C74B499D46AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -638,6 +649,49 @@ Global {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {47B802CC-069D-431E-BF15-E574EDD3BA5D}.Release|x86.ActiveCfg = Release|Any CPU + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Any CPU.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.ActiveCfg = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Debug|x86.Build.0 = Debug|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Any CPU.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|Mixed Platforms.Build.0 = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.ActiveCfg = Release|x86 + {10F7894D-E8B5-4DCA-BB08-5C99FA792388}.Release|x86.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Any CPU.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.ActiveCfg = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Debug|x86.Build.0 = Debug|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Any CPU.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|Mixed Platforms.Build.0 = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.ActiveCfg = Release|x86 + {938D5F88-B888-4B04-BEEE-EE701FBA51EF}.Release|x86.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Any CPU.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.ActiveCfg = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Debug|x86.Build.0 = Debug|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Any CPU.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|Mixed Platforms.Build.0 = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.ActiveCfg = Release|x86 + {14B39F89-C9B0-407E-877A-B515C985E96E}.Release|x86.Build.0 = Release|x86 + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Any CPU.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {566293A4-1187-4289-A28C-C74B499D46AA}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -649,6 +703,9 @@ Global {9588B0C3-E03A-4C71-89A4-2C8685D426F1} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {F9177943-1590-49AE-987D-D6FAE30D96DD} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {47B802CC-069D-431E-BF15-E574EDD3BA5D} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {10F7894D-E8B5-4DCA-BB08-5C99FA792388} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {938D5F88-B888-4B04-BEEE-EE701FBA51EF} = {B24A8593-562A-4A25-BB08-46C163F10F3F} + {14B39F89-C9B0-407E-877A-B515C985E96E} = {B24A8593-562A-4A25-BB08-46C163F10F3F} {5BE49183-2F6F-4527-AC90-D816911FCF90} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} = {D421509A-9AE3-4D7E-881B-EAFED598B028} {B30DE9C2-0926-46B6-8351-9AF276C472D5} = {D421509A-9AE3-4D7E-881B-EAFED598B028} @@ -676,6 +733,7 @@ Global {5CA3CDF5-4D2C-42AC-AD08-641BD3992B75} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {E5D69E75-D77C-493F-BBDA-6F9E73B82549} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {5040A9C7-6DEC-4613-8586-A598C4070B35} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} + {566293A4-1187-4289-A28C-C74B499D46AA} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF} diff --git a/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita.csproj b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita.csproj new file mode 100644 index 00000000..995c295b --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita.csproj @@ -0,0 +1,65 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {566293A4-1187-4289-A28C-C74B499D46AA} + Library + Properties + ANX.InputDevices.PsVita + ANX.InputDevices.PsVita + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll + + + + + + + + + + + + + + + + {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} + ANX.Framework + + + + + \ No newline at end of file diff --git a/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_Linux.csproj b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_Linux.csproj new file mode 100644 index 00000000..5414a133 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_Linux.csproj @@ -0,0 +1,65 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {566293A4-1187-4289-A28C-C74B499D46AA} + Library + Properties + ANX.InputDevices.PsVita + ANX.InputDevices.PsVita + v4.0 + 512 + + + true + full + false + bin\Debug\ + TRACE;DEBUG;LINUX; + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE;LINUX; + prompt + 4 + x86 + + + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll + + + + + + + + + + + + + + + + {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} + ANX.Framework + + + + + \ No newline at end of file diff --git a/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_PSVita.csproj b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_PSVita.csproj new file mode 100644 index 00000000..4acf24b0 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_PSVita.csproj @@ -0,0 +1,65 @@ + + + + Debug + AnyCPU + 10.0.0 + 2.0 + {566293A4-1187-4289-A28C-C74B499D46AA} + Library + Properties + ANX.InputDevices.PsVita + ANX.InputDevices.PsVita + 512 + {69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + TRACE;DEBUG;PSVITA; + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE;PSVITA; + prompt + 4 + x86 + + + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll + + + + + + + + + + + + + + + + {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} + ANX.Framework + + + + + \ No newline at end of file diff --git a/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_WindowsMetro.csproj b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_WindowsMetro.csproj new file mode 100644 index 00000000..7f054cee --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/ANX.InputDevices.PsVita_WindowsMetro.csproj @@ -0,0 +1,71 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {566293A4-1187-4289-A28C-C74B499D46AA} + Library + Properties + ANX.InputDevices.PsVita + ANX.InputDevices.PsVita + 512 + {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + en-US + Test_TemporaryKey.pfx + + + true + full + false + bin\Debug\ + TRACE;DEBUG;WINDOWSMETRO; + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE;WINDOWSMETRO; + prompt + 4 + x86 + + + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll + + + + + + + + + + + + + + + + {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} + ANX.Framework + + + + + + 11.0 + + + \ No newline at end of file diff --git a/InputSystems/ANX.InputDevices.PsVita/GamePad.cs b/InputSystems/ANX.InputDevices.PsVita/GamePad.cs new file mode 100644 index 00000000..08a9e1d6 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/GamePad.cs @@ -0,0 +1,125 @@ +using ANX.Framework; +using ANX.Framework.Input; +using ANX.Framework.NonXNA; +using Sce.PlayStation.Core.Environment; +using SceInput = Sce.PlayStation.Core.Input; + +// 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.InputDevices.PsVita +{ + public class GamePad : IGamePad + { + public GamePadCapabilities GetCapabilities(PlayerIndex playerIndex) + { + return new GamePadCapabilities() + { + GamePadType = GamePadType.GamePad, + HasAButton = true, + HasBackButton = true, + HasBButton = true, + // TODO: same as todo in ConvertButtons! + HasBigButton = true, + + HasDPadDownButton = true, + HasDPadLeftButton = true, + HasDPadRightButton = true, + HasDPadUpButton = true, + HasLeftShoulderButton = true, + HasLeftStickButton = false, + HasLeftTrigger = false, + HasLeftVibrationMotor = false, + HasLeftXThumbStick = true, + HasLeftYThumbStick = true, + HasRightShoulderButton = true, + HasRightStickButton = false, + HasRightTrigger = false, + HasRightVibrationMotor = false, + HasRightXThumbStick = true, + HasRightYThumbStick = true, + HasStartButton = true, + HasVoiceSupport = false, + HasXButton = true, + HasYButton = true, + IsConnected = playerIndex == PlayerIndex.One + }; + } + + public GamePadState GetState(PlayerIndex playerIndex, out bool isConnected, out int packetNumber) + { + SceInput.GamePadData data = SceInput.GamePad.GetData((int)playerIndex); + isConnected = data.Skip == false; + packetNumber = 0; // TODO + + return new GamePadState(new Vector2(data.AnalogLeftX, data.AnalogLeftY), + new Vector2(data.AnalogRightX, data.AnalogRightY), 0f, 0f, ConvertButtons(data.ButtonsDown)); + } + + public GamePadState GetState(PlayerIndex playerIndex, GamePadDeadZone deadZoneMode, + out bool isConnected, out int packetNumber) + { + // TODO: GamePadDeadZone + + SceInput.GamePadData data = SceInput.GamePad.GetData((int)playerIndex); + isConnected = data.Skip == false; + packetNumber = 0; // TODO + + return new GamePadState(new Vector2(data.AnalogLeftX, data.AnalogLeftY), + new Vector2(data.AnalogRightX, data.AnalogRightY), 0f, 0f, ConvertButtons(data.ButtonsDown)); + } + + public bool SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor) + { + return false; + } + + private Buttons ConvertButtons(SceInput.GamePadButtons sceButtons) + { + Buttons result = (Buttons)0; + + if ((sceButtons & SceInput.GamePadButtons.Up) > 0) + result |= Buttons.DPadUp; + if ((sceButtons & SceInput.GamePadButtons.Down) > 0) + result |= Buttons.DPadDown; + if ((sceButtons & SceInput.GamePadButtons.Left) > 0) + result |= Buttons.DPadLeft; + if ((sceButtons & SceInput.GamePadButtons.Right) > 0) + result |= Buttons.DPadRight; + + if ((sceButtons & SceInput.GamePadButtons.Start) > 0) + result |= Buttons.Start; + if ((sceButtons & SceInput.GamePadButtons.Back) > 0) + result |= Buttons.Back; + if ((sceButtons & SceInput.GamePadButtons.L) > 0) + result |= Buttons.LeftShoulder; + if ((sceButtons & SceInput.GamePadButtons.R) > 0) + result |= Buttons.RightShoulder; + + if ((sceButtons & SceInput.GamePadButtons.Triangle) > 0) + result |= Buttons.Y; + if ((sceButtons & SceInput.GamePadButtons.Square) > 0) + result |= Buttons.X; + if ((sceButtons & SceInput.GamePadButtons.Circle) > 0) + result |= Buttons.B; + if ((sceButtons & SceInput.GamePadButtons.Cross) > 0) + result |= Buttons.A; + + // TODO: think about this mapping + if ((sceButtons & SceInput.GamePadButtons.Select) > 0) + result |= Buttons.BigButton; + + if ((sceButtons & SceInput.GamePadButtons.Enter) > 0) + { + var enterMeaning = SystemParameters.GamePadButtonMeaning; + if (enterMeaning == GamePadButtonMeaning.CircleIsEnter) + result |= Buttons.B; + else + result |= Buttons.A; + } + + return result; + } + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/GamePadCreator.cs b/InputSystems/ANX.InputDevices.PsVita/GamePadCreator.cs new file mode 100644 index 00000000..e4da91c7 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/GamePadCreator.cs @@ -0,0 +1,39 @@ +using System; +using ANX.Framework.NonXNA; +using ANX.Framework.NonXNA.InputSystem; + +// 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.InputDevices.PsVita +{ + public class GamePadCreator : IGamePadCreator + { + public string Name + { + get + { + return "PsVita.GamePad"; + } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(typeof(GamePadCreator), this); + } + + public int Priority + { + get + { + return 10; + } + } + + public IGamePad CreateGamePadInstance() + { + return new GamePad(); + } + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/KeyboardCreator.cs b/InputSystems/ANX.InputDevices.PsVita/KeyboardCreator.cs new file mode 100644 index 00000000..a459af6c --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/KeyboardCreator.cs @@ -0,0 +1,39 @@ +using System; +using ANX.Framework.NonXNA; +using ANX.Framework.NonXNA.InputSystem; + +// 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.InputDevices.PsVita +{ + public class KeyboardCreator : IKeyboardCreator + { + public string Name + { + get + { + return "PsVita.Keyboard"; + } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(typeof(KeyboardCreator), this); + } + + public int Priority + { + get + { + return 10; + } + } + + public IKeyboard CreateKeyboardInstance() + { + throw new NotImplementedException(); + } + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/MouseCreator.cs b/InputSystems/ANX.InputDevices.PsVita/MouseCreator.cs new file mode 100644 index 00000000..2f5791a7 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/MouseCreator.cs @@ -0,0 +1,39 @@ +using System; +using ANX.Framework.NonXNA; +using ANX.Framework.NonXNA.InputSystem; + +// 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.InputDevices.PsVita +{ + public class MouseCreator : IMouseCreator + { + public string Name + { + get + { + return "PsVita.Mouse"; + } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(typeof(MouseCreator), this); + } + + public int Priority + { + get + { + return 10; + } + } + + public IMouse CreateMouseInstance() + { + throw new NotImplementedException(); + } + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/Properties/AssemblyInfo.cs b/InputSystems/ANX.InputDevices.PsVita/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..a772dd42 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("ANX.InputDevices.PsVita")] +[assembly: AssemblyDescription("Input Devices PsVita")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ANX.Framework Team")] +[assembly: AssemblyProduct("ANX.InputDevices.PsVita")] +[assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("2234b9f7-75f9-4f99-b8b8-6c932d9f84e4")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/InputSystems/ANX.InputDevices.PsVita/SupportedPlatformsImpl.cs b/InputSystems/ANX.InputDevices.PsVita/SupportedPlatformsImpl.cs new file mode 100644 index 00000000..bcf142be --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/SupportedPlatformsImpl.cs @@ -0,0 +1,23 @@ +using System; +using ANX.Framework.NonXNA; + +// 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.InputDevices.PsVita +{ + public class SupportedPlatformsImpl : ISupportedPlatforms + { + public PlatformName[] Names + { + get + { + return new PlatformName[] + { + PlatformName.PSVita + }; + } + } + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/TouchPanel.cs b/InputSystems/ANX.InputDevices.PsVita/TouchPanel.cs new file mode 100644 index 00000000..77d556a4 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/TouchPanel.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using ANX.Framework; +using ANX.Framework.Input.Touch; +using ANX.Framework.NonXNA; +using Sce.PlayStation.Core.Input; + +// 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.InputDevices.PsVita +{ + public class TouchPanel : ITouchPanel + { + #region Constants + private static readonly TouchPanelCapabilities caps = new TouchPanelCapabilities() + { + IsConnected = true, + MaximumTouchCount = 6, + }; + #endregion + + #region Public + public GestureType EnabledGestures + { + get; + set; + } + + public bool IsGestureAvailable + { + get + { + // TODO + return false; + } + } + + public IntPtr WindowHandle + { + get; + set; + } + + public DisplayOrientation DisplayOrientation + { + get; + set; + } + + public int DisplayWidth + { + get; + set; + } + + public int DisplayHeight + { + get; + set; + } + #endregion + + #region GetCapabilities + public TouchPanelCapabilities GetCapabilities() + { + return caps; + } + #endregion + + #region ReadGesture + public GestureSample ReadGesture() + { + //return new GestureSample() + //{ + // GestureType = GestureType. + //}; + //MotionData motion = Motion.GetData(0); + throw new NotImplementedException(); + } + #endregion + + #region GetState + public TouchCollection GetState() + { + var touchLocations = new List(); + + var allTouches = Touch.GetData(0); + foreach (var touch in allTouches) + { + touchLocations.Add(new TouchLocation(touch.ID, TranslateTouchStatus(touch.Status), + new Vector2(touch.X, touch.Y))); + } + + return new TouchCollection(touchLocations.ToArray()); + } + #endregion + + #region TranslateTouchStatus + private TouchLocationState TranslateTouchStatus(TouchStatus status) + { + switch (status) + { + case TouchStatus.Down: + return TouchLocationState.Pressed; + case TouchStatus.Up: + case TouchStatus.Canceled: + return TouchLocationState.Released; + case TouchStatus.Move: + return TouchLocationState.Moved; + case TouchStatus.None: + return TouchLocationState.Invalid; + } + + throw new ArgumentException("Can't translate TouchStatus '" + status + "'!"); + } + #endregion + + #region Dispose + public void Dispose() + { + } + #endregion + } +} diff --git a/InputSystems/ANX.InputDevices.PsVita/TouchPanelCreator.cs b/InputSystems/ANX.InputDevices.PsVita/TouchPanelCreator.cs new file mode 100644 index 00000000..04e9caa7 --- /dev/null +++ b/InputSystems/ANX.InputDevices.PsVita/TouchPanelCreator.cs @@ -0,0 +1,39 @@ +using System; +using ANX.Framework.NonXNA; +using ANX.Framework.NonXNA.InputSystem; + +// 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.InputDevices.PsVita +{ + public class TouchPanelCreator : ITouchPanelCreator + { + public string Name + { + get + { + return "PsVita.TouchPanel"; + } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(typeof(TouchPanelCreator), this); + } + + public int Priority + { + get + { + return 10; + } + } + + public ITouchPanel CreateTouchPanelInstance() + { + return new TouchPanel(); + } + } +} diff --git a/InputSystems/ANX.InputDevices.Test/Creator.cs b/InputSystems/ANX.InputDevices.Test/Creator.cs index 0fda7d68..c380f7fb 100644 --- a/InputSystems/ANX.InputDevices.Test/Creator.cs +++ b/InputSystems/ANX.InputDevices.Test/Creator.cs @@ -1,91 +1,95 @@ -#region Using Statements using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using ANX.Framework.NonXNA; -#endregion - // 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.InputDevices.Test { - public class Creator:IInputSystemCreator - { - private Mouse _mouse; - private Keyboard _keyboard; - private GamePad _gamePad; + public class Creator : IInputSystemCreator + { + private Mouse _mouse; + private Keyboard _keyboard; + private GamePad _gamePad; + public IGamePad GamePad + { + get + { + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); + if (_gamePad == null) + _gamePad = new GamePad(); + return _gamePad; + } + } + public IMouse Mouse + { + get + { + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); + if (_mouse == null) + _mouse = new Mouse(); + return _mouse; + } + } - public IGamePad GamePad - { - get - { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); - if (_gamePad == null) - { - _gamePad = new GamePad(); - } - return _gamePad; - } - } + public IKeyboard Keyboard + { + get + { + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); + if (_keyboard == null) + _keyboard = new Keyboard(); + return _keyboard; + } + } - public IMouse Mouse - { - get - { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); - if (_mouse == null) - { - _mouse = new Mouse(); - } - return _mouse; - } - } + public ITouchPanel TouchPanel + { + get + { + throw new NotImplementedException(); + } + } - public IKeyboard Keyboard - { - get - { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); - if (_keyboard == null) - { - _keyboard = new Keyboard(); - } - return _keyboard; - } - } + public IMotionSensingDevice MotionSensingDevice + { + get + { + throw new NotImplementedException(); + } + } - public IMotionSensingDevice MotionSensingDevice - { - get { throw new NotImplementedException(); } - } + public string Name + { + get + { + return "Test"; + } + } - public void RegisterCreator(AddInSystemFactory factory) - { - factory.AddCreator(this); - } + public int Priority + { + get + { + return int.MaxValue; + } + } - public string Name - { - get { return "Test"; } - } + public bool IsSupported + { + get + { + // This is just for test, so it runs on all plattforms + return true; + } + } - public int Priority - { - get { return int.MaxValue; } - } - - public bool IsSupported - { - get { return true; } //This is just for test, so it runs on all plattforms - } - } + public void RegisterCreator(AddInSystemFactory factory) + { + factory.AddCreator(this); + } + } } diff --git a/InputSystems/ANX.InputSystem.Recording/Creator.cs b/InputSystems/ANX.InputSystem.Recording/Creator.cs index 254723b8..2407f1b2 100644 --- a/InputSystems/ANX.InputSystem.Recording/Creator.cs +++ b/InputSystems/ANX.InputSystem.Recording/Creator.cs @@ -1,12 +1,6 @@ -#region Using Statements using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using ANX.Framework.NonXNA; -#endregion - // 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 @@ -23,12 +17,20 @@ namespace ANX.InputSystem.Recording RecordingMotionSensingDevice msd; #endif + public ITouchPanel TouchPanel + { + get + { + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); + throw new NotImplementedException(); + } + } + public IGamePad GamePad { get { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); if (gamePad == null) gamePad = new RecordingGamePad(); return gamePad; @@ -39,8 +41,7 @@ namespace ANX.InputSystem.Recording { get { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); if (mouse == null) mouse = new RecordingMouse(); return mouse; @@ -51,8 +52,7 @@ namespace ANX.InputSystem.Recording { get { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); if (keyboard == null) keyboard = new RecordingKeyboard(); return keyboard; @@ -64,8 +64,7 @@ namespace ANX.InputSystem.Recording { get { - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); if (msd == null) msd = new RecordingMotionSensingDevice(); return msd; @@ -73,25 +72,34 @@ namespace ANX.InputSystem.Recording } #endif + public string Name + { + get + { + return "Recording"; + } + } + + public int Priority + { + get + { + return int.MaxValue; + } + } + + public bool IsSupported + { + get + { + // This is just a proxy, so it runs on all plattforms + return true; + } + } + public void RegisterCreator(AddInSystemFactory factory) { factory.AddCreator(this); } - - public string Name - { - get { return "Recording"; } - } - - public int Priority - { - get { return int.MaxValue; } - } - - public bool IsSupported - { - get { return true; } //This is just a proxy, so it runs on all plattforms - } - } } diff --git a/InputSystems/ANX.InputSystem.Recording/RecordingHelper.cs b/InputSystems/ANX.InputSystem.Recording/RecordingHelper.cs index 9cb5748a..6b31257f 100644 --- a/InputSystems/ANX.InputSystem.Recording/RecordingHelper.cs +++ b/InputSystems/ANX.InputSystem.Recording/RecordingHelper.cs @@ -1,12 +1,5 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using ANX.Framework.NonXNA; -#endregion - // 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 diff --git a/InputSystems/ANX.InputSystem.Standard/Creator.cs b/InputSystems/ANX.InputSystem.Standard/Creator.cs index 676a8563..bf076dd5 100644 --- a/InputSystems/ANX.InputSystem.Standard/Creator.cs +++ b/InputSystems/ANX.InputSystem.Standard/Creator.cs @@ -21,7 +21,10 @@ namespace ANX.InputDevices.Standard public int Priority { - get { return 0; } + get + { + return 0; + } } public bool IsSupported @@ -32,19 +35,22 @@ namespace ANX.InputDevices.Standard } } - public void RegisterCreator(AddInSystemFactory factory) + public ITouchPanel TouchPanel { - Logger.Info("adding Standard InputSystem creator to creator collection of AddInSystemFactory"); - factory.AddCreator(this); + get + { + Logger.Info("Creating a new TouchPanel device."); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); + return InputDeviceFactory.Instance.GetDefaultTouchPanel(); + } } public IGamePad GamePad { get { - Logger.Info("returning a new GamePad device"); - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + Logger.Info("Creating a new GamePad device."); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); return InputDeviceFactory.Instance.GetDefaultGamePad(); } } @@ -61,8 +67,7 @@ namespace ANX.InputDevices.Standard throw new NoInputDeviceException("couldn't find a default mouse device creator. Unable to create a mouse instance."); } Logger.Info("created a new Mouse device"); - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); } return this.mouse; @@ -81,8 +86,7 @@ namespace ANX.InputDevices.Standard throw new NoInputDeviceException("couldn't find a default keyboard device creator. Unable to create a keyboard instance."); } Logger.Info("created a new Keyboard device"); - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); } return this.keyboard; @@ -94,12 +98,17 @@ namespace ANX.InputDevices.Standard { get { - Logger.Info("returning a new MotionSensingDevice device"); - AddInSystemFactory.Instance.PreventSystemChange( - AddInType.InputSystem); + Logger.Info("Creating a new MotionSensingDevice device."); + AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem); return InputDeviceFactory.Instance.GetDefaultMotionSensingDevice(); } } #endif + + public void RegisterCreator(AddInSystemFactory factory) + { + Logger.Info("adding Standard InputSystem creator to creator collection of AddInSystemFactory"); + factory.AddCreator(this); + } } } diff --git a/InputSystems/ANX.InputSystem.Standard/SupportedPlatformsImpl.cs b/InputSystems/ANX.InputSystem.Standard/SupportedPlatformsImpl.cs index ee7feec6..9ea1dd01 100644 --- a/InputSystems/ANX.InputSystem.Standard/SupportedPlatformsImpl.cs +++ b/InputSystems/ANX.InputSystem.Standard/SupportedPlatformsImpl.cs @@ -15,6 +15,9 @@ namespace ANX.InputSystem.Standard { return new PlatformName[] { + PlatformName.Android, + PlatformName.IOS, + PlatformName.PSVita, PlatformName.Linux, PlatformName.MacOSX, PlatformName.WindowsXP, diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL.csproj b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL.csproj index 7b0a8d1d..95a3c918 100644 --- a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL.csproj +++ b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + true pdbonly @@ -29,9 +30,11 @@ TRACE prompt 4 + true bin\DebugWin8\ + true bin\ReleaseWin8\ @@ -47,6 +50,7 @@ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + true @@ -61,6 +65,7 @@ + diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_Linux.csproj b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_Linux.csproj index 1fa3a4ae..c7875f37 100644 --- a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_Linux.csproj +++ b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_Linux.csproj @@ -21,6 +21,7 @@ TRACE;DEBUG;LINUX; prompt 4 + true pdbonly @@ -29,9 +30,11 @@ TRACE;LINUX; prompt 4 + true bin\DebugWin8\ + true bin\ReleaseWin8\ @@ -47,6 +50,7 @@ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + true @@ -61,6 +65,7 @@ + diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_PSVita.csproj b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_PSVita.csproj index 67e88030..cc6b822c 100644 --- a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_PSVita.csproj +++ b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_PSVita.csproj @@ -21,6 +21,7 @@ TRACE;DEBUG;PSVITA; prompt 4 + true pdbonly @@ -29,9 +30,11 @@ TRACE;PSVITA; prompt 4 + true bin\DebugWin8\ + true bin\ReleaseWin8\ @@ -47,6 +50,7 @@ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + true @@ -61,6 +65,7 @@ + diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_WindowsMetro.csproj b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_WindowsMetro.csproj index c1b0ab89..647fd7e1 100644 --- a/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_WindowsMetro.csproj +++ b/SoundSystems/ANX.SoundSystem.OpenAL/ANX.SoundSystem.OpenAL_WindowsMetro.csproj @@ -23,6 +23,7 @@ TRACE;DEBUG;WINDOWSMETRO; prompt 4 + true pdbonly @@ -31,9 +32,11 @@ TRACE;WINDOWSMETRO; prompt 4 + true bin\DebugWin8\ + true bin\ReleaseWin8\ @@ -49,6 +52,7 @@ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + true @@ -63,6 +67,7 @@ + diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/Creator.cs b/SoundSystems/ANX.SoundSystem.OpenAL/Creator.cs index 0e2df484..a83dcb09 100644 --- a/SoundSystems/ANX.SoundSystem.OpenAL/Creator.cs +++ b/SoundSystems/ANX.SoundSystem.OpenAL/Creator.cs @@ -137,11 +137,11 @@ namespace ANX.SoundSystem.OpenAL } #endregion - #region CreateAudioListener (TODO) + #region CreateAudioListener public IAudioListener CreateAudioListener() { AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem); - throw new NotImplementedException(); + return new OpenALAudioListener(); } #endregion diff --git a/SoundSystems/ANX.SoundSystem.OpenAL/OpenALAudioListener.cs b/SoundSystems/ANX.SoundSystem.OpenAL/OpenALAudioListener.cs new file mode 100644 index 00000000..6a4b85fe --- /dev/null +++ b/SoundSystems/ANX.SoundSystem.OpenAL/OpenALAudioListener.cs @@ -0,0 +1,81 @@ +using System; +using ANX.Framework; +using ANX.Framework.NonXNA.SoundSystem; +using OpenTK.Audio.OpenAL; + +// 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.SoundSystem.OpenAL +{ + public class OpenALAudioListener : IAudioListener + { + #region Private + private OpenTK.Vector3 forward; + private OpenTK.Vector3 up; + #endregion + + #region Public + public Vector3 Forward + { + get + { + AL.GetListener(ALListenerfv.Orientation, out forward, out up); + return new Vector3(forward.X, forward.Y, forward.Z); + } + set + { + forward.X = value.X; + forward.Y = value.Y; + forward.Z = value.Z; + AL.Listener(ALListenerfv.Orientation, ref forward, ref up); + } + } + + public Vector3 Position + { + get + { + Vector3 result; + AL.GetListener(ALListener3f.Position, out result.X, out result.Y, out result.Z); + return result; + } + set + { + AL.Listener(ALListener3f.Position, value.X, value.Y, value.Z); + } + } + + public Vector3 Up + { + get + { + AL.GetListener(ALListenerfv.Orientation, out forward, out up); + return new Vector3(up.X, up.Y, up.Z); + } + set + { + up.X = value.X; + up.Y = value.Y; + up.Z = value.Z; + AL.Listener(ALListenerfv.Orientation, ref forward, ref up); + } + } + + public Vector3 Velocity + { + get + { + Vector3 result; + AL.GetListener(ALListener3f.Velocity, out result.X, out result.Y, out result.Z); + return result; + } + set + { + AL.Listener(ALListener3f.Velocity, value.X, value.Y, value.Z); + } + } + #endregion + } +}