- Implemented TouchPanel classes and added native TouchPanel interface

- Started PsVita Input project and implemented Touch and GamePad so far
- Added OpenALAudioListener
This commit is contained in:
SND\AstrorEnales_cp 2012-08-22 09:51:35 +00:00
parent 56cc1a70af
commit 9200286a83
47 changed files with 1634 additions and 473 deletions

View File

@ -34,6 +34,8 @@
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="AnxContentImporterContext.cs" />
<Compile Include="AnxContentProcessorContext.cs" />
<Compile Include="Audio\AudioContent.cs" />
<Compile Include="Audio\AudioFileType.cs" />
<Compile Include="Audio\AudioFormat.cs" />
@ -165,6 +167,11 @@
<Compile Include="Serialization\Compiler\SystemTypeWriters\NullableWriter.cs" />
<Compile Include="Serialization\Compiler\SystemTypeWriters\TimeSpanWriter.cs" />
<Compile Include="TargetPlatform.cs" />
<Compile Include="Tasks\BuildContent.cs" />
<Compile Include="Tasks\BuildItem.cs" />
<Compile Include="Tasks\BuildRequest.cs" />
<Compile Include="Tasks\ImporterManager.cs" />
<Compile Include="Tasks\ProcessorManager.cs" />
<Compile Include="VideoContent.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -34,6 +34,8 @@
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="AnxContentImporterContext.cs" />
<Compile Include="AnxContentProcessorContext.cs" />
<Compile Include="Audio\AudioContent.cs" />
<Compile Include="Audio\AudioFileType.cs" />
<Compile Include="Audio\AudioFormat.cs" />
@ -165,6 +167,11 @@
<Compile Include="Serialization\Compiler\SystemTypeWriters\NullableWriter.cs" />
<Compile Include="Serialization\Compiler\SystemTypeWriters\TimeSpanWriter.cs" />
<Compile Include="TargetPlatform.cs" />
<Compile Include="Tasks\BuildContent.cs" />
<Compile Include="Tasks\BuildItem.cs" />
<Compile Include="Tasks\BuildRequest.cs" />
<Compile Include="Tasks\ImporterManager.cs" />
<Compile Include="Tasks\ProcessorManager.cs" />
<Compile Include="VideoContent.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -36,6 +36,8 @@
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="AnxContentImporterContext.cs" />
<Compile Include="AnxContentProcessorContext.cs" />
<Compile Include="Audio\AudioContent.cs" />
<Compile Include="Audio\AudioFileType.cs" />
<Compile Include="Audio\AudioFormat.cs" />
@ -167,6 +169,11 @@
<Compile Include="Serialization\Compiler\SystemTypeWriters\NullableWriter.cs" />
<Compile Include="Serialization\Compiler\SystemTypeWriters\TimeSpanWriter.cs" />
<Compile Include="TargetPlatform.cs" />
<Compile Include="Tasks\BuildContent.cs" />
<Compile Include="Tasks\BuildItem.cs" />
<Compile Include="Tasks\BuildRequest.cs" />
<Compile Include="Tasks\ImporterManager.cs" />
<Compile Include="Tasks\ProcessorManager.cs" />
<Compile Include="VideoContent.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -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}

View File

@ -419,6 +419,8 @@
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanel.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanelCreator.cs" />
<Compile Include="NonXNA\ISupportedPlatforms.cs" />
<Compile Include="NonXNA\Logger.cs" />
<Compile Include="NonXNA\ManifestHelper.cs" />

View File

@ -419,6 +419,8 @@
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanel.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanelCreator.cs" />
<Compile Include="NonXNA\ISupportedPlatforms.cs" />
<Compile Include="NonXNA\Logger.cs" />
<Compile Include="NonXNA\ManifestHelper.cs" />

View File

@ -420,6 +420,8 @@
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanel.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanelCreator.cs" />
<Compile Include="NonXNA\ISupportedPlatforms.cs" />
<Compile Include="NonXNA\Logger.cs" />
<Compile Include="NonXNA\ManifestHelper.cs" />

View File

@ -422,6 +422,8 @@
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanel.cs" />
<Compile Include="NonXNA\InputSystem\ITouchPanelCreator.cs" />
<Compile Include="NonXNA\ISupportedPlatforms.cs" />
<Compile Include="NonXNA\Logger.cs" />
<Compile Include="NonXNA\ManifestHelper.cs" />

View File

@ -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

View File

@ -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,26 +8,16 @@ 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
public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, Vector2 position2, Vector2 delta, Vector2 delta2)
{
this.gestureType = gestureType;
this.timestamp = timestamp;
this.position = position;
this.position2 = position2;
this.delta = delta;
this.delta2 = delta2;
}
#region Public
public Vector2 Delta
{
get
@ -78,5 +65,19 @@ namespace ANX.Framework.Input.Touch
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;
this.position = position;
this.position2 = position2;
this.delta = delta;
this.delta2 = delta2;
}
#endregion
}
}

View File

@ -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.
@ -13,110 +10,11 @@ namespace ANX.Framework.Input.Touch
{
public struct TouchCollection : IList<TouchLocation>, ICollection<TouchLocation>, IEnumerable<TouchLocation>, IEnumerable
{
public TouchCollection(TouchLocation[] touches)
{
throw new NotImplementedException();
}
public int IndexOf(TouchLocation item)
{
throw new NotImplementedException();
}
public void Insert(int index, TouchLocation item)
{
throw new NotImplementedException();
}
public void RemoveAt(int index)
{
throw new NotImplementedException();
}
public TouchLocation this[int index]
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public void Add(TouchLocation item)
{
throw new NotImplementedException();
}
public void Clear()
{
throw new NotImplementedException();
}
public bool Contains(TouchLocation item)
{
throw new NotImplementedException();
}
public void CopyTo(TouchLocation[] array, int arrayIndex)
{
throw new NotImplementedException();
}
public bool FindById(int id, out TouchLocation touchLocation)
{
throw new NotImplementedException();
}
public int Count
{
get { throw new NotImplementedException(); }
}
public bool IsConnected
{
get
{
throw new NotImplementedException();
}
}
public bool IsReadOnly
{
get { throw new NotImplementedException(); }
}
public bool Remove(TouchLocation item)
{
throw new NotImplementedException();
}
public Enumerator GetEnumerator()
{
return new Enumerator(this);
}
IEnumerator<TouchLocation> IEnumerable<TouchLocation>.GetEnumerator()
{
throw new NotImplementedException();
}
IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
#region Enumerator (helper struct)
public struct Enumerator : IEnumerator<TouchLocation>, IDisposable, IEnumerator
{
private TouchCollection collection;
private int position;
internal Enumerator(TouchCollection collection)
{
this.collection = collection;
this.position = -1;
}
public TouchLocation Current
{
@ -125,6 +23,21 @@ namespace ANX.Framework.Input.Touch
return this.collection[this.position];
}
}
object IEnumerator.Current
{
get
{
return this.Current;
}
}
internal Enumerator(TouchCollection collection)
{
this.collection = collection;
this.position = -1;
}
public bool MoveNext()
{
this.position++;
@ -144,15 +57,146 @@ namespace ANX.Framework.Input.Touch
public void Dispose()
{
}
}
#endregion
object IEnumerator.Current
#region Private
private List<TouchLocation> locations;
#endregion
#region Public (TODO)
public TouchLocation this[int index]
{
get
{
return this.Current;
return locations[index];
}
set
{
locations[index] = value;
}
}
public int Count
{
get
{
return locations.Count;
}
}
public bool IsConnected
{
get
{
throw new NotImplementedException();
}
}
public bool IsReadOnly
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
public TouchCollection(TouchLocation[] touches)
{
locations = new List<TouchLocation>(touches);
}
#endregion
#region IndexOf
public int IndexOf(TouchLocation item)
{
return locations.IndexOf(item);
}
#endregion
#region Insert
public void Insert(int index, TouchLocation item)
{
locations.Insert(index, item);
}
#endregion
#region RemoveAt
public void RemoveAt(int index)
{
locations.RemoveAt(index);
}
#endregion
#region Add
public void Add(TouchLocation item)
{
locations.Add(item);
}
#endregion
#region Clear
public void Clear()
{
locations.Clear();
}
#endregion
#region Contains
public bool Contains(TouchLocation item)
{
return locations.Contains(item);
}
#endregion
#region CopyTo
public void CopyTo(TouchLocation[] array, int arrayIndex)
{
locations.CopyTo(array, arrayIndex);
}
#endregion
#region FindById
public bool FindById(int id, out TouchLocation touchLocation)
{
foreach (var location in locations)
{
if (location.Id == id)
{
touchLocation = location;
return true;
}
}
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<TouchLocation> IEnumerable<TouchLocation>.GetEnumerator()
{
return new Enumerator(this);
}
IEnumerator IEnumerable.GetEnumerator()
{
return new Enumerator(this);
}
#endregion
}
}

View File

@ -11,90 +11,15 @@ namespace ANX.Framework.Input.Touch
{
public struct TouchLocation : IEquatable<TouchLocation>
{
#region Private members
#region Private
private int id;
private TouchLocationState prevState;
private Vector2 prevPos;
private TouchLocationState state;
private Vector2 pos;
#endregion
#endregion // Private members
public TouchLocation(int id, TouchLocationState state, Vector2 position)
{
this.id = id;
this.state = state;
this.pos = position;
this.prevState = TouchLocationState.Invalid;
this.prevPos = Vector2.Zero;
}
public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState, Vector2 previousPosition)
{
this.id = id;
this.state = state;
this.pos = position;
this.prevState = previousState;
this.prevPos = previousPosition;
}
public bool TryGetPreviousLocation(out TouchLocation previousLocation)
{
if (this.prevState == TouchLocationState.Invalid)
{
previousLocation.id = -1;
previousLocation.state = TouchLocationState.Invalid;
previousLocation.pos = Vector2.Zero;
previousLocation.prevState = TouchLocationState.Invalid;
previousLocation.prevPos = Vector2.Zero;
return false;
}
previousLocation.id = this.id;
previousLocation.state = this.prevState;
previousLocation.pos = this.pos;
previousLocation.prevState = TouchLocationState.Invalid;
previousLocation.prevPos = this.prevPos;
return true;
}
public override string ToString()
{
return string.Format("{{Position:{0}}}", this.pos);
}
public override int GetHashCode()
{
return this.id.GetHashCode() + this.pos.X.GetHashCode() + this.pos.Y.GetHashCode();
}
public override bool Equals(Object other)
{
if (other != null && other.GetType() == this.GetType())
{
return this == (TouchLocation)other;
}
return false;
}
public bool Equals(TouchLocation other)
{
return this.id == other.id && this.pos == other.pos && this.prevPos == other.prevPos;
}
public static bool operator ==(TouchLocation lhs, TouchLocation rhs)
{
return lhs.id == rhs.id && lhs.pos == rhs.pos && lhs.prevPos == rhs.prevPos;
}
public static bool operator !=(TouchLocation lhs, TouchLocation rhs)
{
return lhs.id != rhs.id || lhs.pos != rhs.pos || lhs.prevPos != rhs.prevPos;
}
#region Public
public int Id
{
get
@ -118,5 +43,94 @@ namespace ANX.Framework.Input.Touch
return this.state;
}
}
#endregion
#region Constructor
public TouchLocation(int id, TouchLocationState state, Vector2 position)
{
this.id = id;
this.state = state;
this.pos = position;
this.prevState = TouchLocationState.Invalid;
this.prevPos = Vector2.Zero;
}
public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState,
Vector2 previousPosition)
{
this.id = id;
this.state = state;
this.pos = position;
this.prevState = previousState;
this.prevPos = previousPosition;
}
#endregion
#region TryGetPreviousLocation
public bool TryGetPreviousLocation(out TouchLocation previousLocation)
{
if (this.prevState == TouchLocationState.Invalid)
{
previousLocation.id = -1;
previousLocation.state = TouchLocationState.Invalid;
previousLocation.pos = Vector2.Zero;
previousLocation.prevState = TouchLocationState.Invalid;
previousLocation.prevPos = Vector2.Zero;
return false;
}
previousLocation.id = this.id;
previousLocation.state = this.prevState;
previousLocation.pos = this.pos;
previousLocation.prevState = TouchLocationState.Invalid;
previousLocation.prevPos = this.prevPos;
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 is TouchLocation)
{
return this == (TouchLocation)other;
}
return false;
}
public bool Equals(TouchLocation other)
{
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;
}
public static bool operator !=(TouchLocation lhs, TouchLocation rhs)
{
return lhs.id != rhs.id || lhs.pos != rhs.pos || lhs.prevPos != rhs.prevPos;
}
#endregion
}
}

View File

@ -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<IInputSystemCreator>().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
}
}

View File

@ -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;
}
}
}

View File

@ -69,22 +69,24 @@ namespace ANX.Framework.NonXNA
#region Constructor
private InputDeviceFactory()
{
deviceCreators =
new Dictionary<Type, Dictionary<string, IInputDeviceCreator>>();
deviceCreators.Add(typeof(IGamePadCreator),
new Dictionary<string, IInputDeviceCreator>());
deviceCreators.Add(typeof(IKeyboardCreator),
new Dictionary<string, IInputDeviceCreator>());
deviceCreators.Add(typeof(IMouseCreator),
new Dictionary<string, IInputDeviceCreator>());
deviceCreators = new Dictionary<Type, Dictionary<string, IInputDeviceCreator>>();
RegisterCreatorType<IGamePadCreator>();
RegisterCreatorType<IKeyboardCreator>();
RegisterCreatorType<IMouseCreator>();
RegisterCreatorType<ITouchPanelCreator>();
#if XNAEXT
deviceCreators.Add(typeof(IMotionSensingDeviceCreator),
new Dictionary<string, IInputDeviceCreator>());
RegisterCreatorType<IMotionSensingDeviceCreator>();
#endif
}
#endregion
#region RegisterCreatorType
private void RegisterCreatorType<T>()
{
deviceCreators.Add(typeof(T), new Dictionary<string, IInputDeviceCreator>());
}
#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,89 +107,78 @@ namespace ANX.Framework.NonXNA
}
#endregion
#region GetDefaultTouchPanel
public ITouchPanel GetDefaultTouchPanel()
{
ValidateWindowHandle();
var touchPanel = GetDefaultCreator<ITouchPanelCreator>().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<IInputDeviceCreator>();
return ((IGamePadCreator)creator).CreateGamePadInstance();
}
throw new Exception("Unable to create instance of GamePad because no GamePadCreator was registered.");
return GetDefaultCreator<IGamePadCreator>().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<IInputDeviceCreator>();
IMouse mouse = ((IMouseCreator)creator).CreateMouseInstance();
var mouse = GetDefaultCreator<IMouseCreator>().CreateMouseInstance();
mouse.WindowHandle = this.windowHandle;
return mouse;
}
throw new Exception("Unable to create instance of Mouse because no MouseCreator was registered.");
}
#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<IInputDeviceCreator>();
IKeyboard keyboard =
((IKeyboardCreator)creator).CreateKeyboardInstance();
var keyboard = GetDefaultCreator<IKeyboardCreator>().CreateKeyboardInstance();
keyboard.WindowHandle = this.windowHandle;
return keyboard;
}
throw new Exception("Unable to create instance of Keyboard because no KeyboardCreator was registered.");
}
#endregion
#region GetDefaultMotionSensingDevice
#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<IInputDeviceCreator>();
return ((IMotionSensingDeviceCreator)creator)
.CreateMotionSensingDeviceInstance();
}
throw new Exception("Unable to create instance of MotionSensingDevice because no MotionSensingDeviceCreator was registered.");
return GetDefaultCreator<IMotionSensingDeviceCreator>().CreateMotionSensingDeviceInstance();
}
#endif
#endregion
#region GetDefaultCreator
private T GetDefaultCreator<T>() where T : IInputDeviceCreator
{
Type creatorType = typeof(T);
if (deviceCreators.ContainsKey(creatorType))
{
var creators = deviceCreators[creatorType];
if (creators.Count > 0)
{
return (T)creators.Values.First<IInputDeviceCreator>();
}
}
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
}
}

View File

@ -21,6 +21,8 @@ namespace ANX.Framework.NonXNA
IKeyboard Keyboard { get; }
ITouchPanel TouchPanel { get; }
#if XNAEXT
IMotionSensingDevice MotionSensingDevice { get; }
#endif

View File

@ -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

View File

@ -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

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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")]

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{566293A4-1187-4289-A28C-C74B499D46AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ANX.InputDevices.PsVita</RootNamespace>
<AssemblyName>ANX.InputDevices.PsVita</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sce.PlayStation.Core">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="GamePad.cs" />
<Compile Include="GamePadCreator.cs" />
<Compile Include="KeyboardCreator.cs" />
<Compile Include="TouchPanel.cs" />
<Compile Include="TouchPanelCreator.cs" />
<Compile Include="MouseCreator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SupportedPlatformsImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{566293A4-1187-4289-A28C-C74B499D46AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ANX.InputDevices.PsVita</RootNamespace>
<AssemblyName>ANX.InputDevices.PsVita</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sce.PlayStation.Core">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="GamePad.cs" />
<Compile Include="GamePadCreator.cs" />
<Compile Include="KeyboardCreator.cs" />
<Compile Include="TouchPanel.cs" />
<Compile Include="TouchPanelCreator.cs" />
<Compile Include="MouseCreator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SupportedPlatformsImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_Linux.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{566293A4-1187-4289-A28C-C74B499D46AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ANX.InputDevices.PsVita</RootNamespace>
<AssemblyName>ANX.InputDevices.PsVita</AssemblyName>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sce.PlayStation.Core">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="GamePad.cs" />
<Compile Include="GamePadCreator.cs" />
<Compile Include="KeyboardCreator.cs" />
<Compile Include="TouchPanel.cs" />
<Compile Include="TouchPanelCreator.cs" />
<Compile Include="MouseCreator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SupportedPlatformsImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_PSVita.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Sce\Sce.Psm.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{566293A4-1187-4289-A28C-C74B499D46AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ANX.InputDevices.PsVita</RootNamespace>
<AssemblyName>ANX.InputDevices.PsVita</AssemblyName>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sce.PlayStation.Core">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Psm\v1.0\Sce.PlayStation.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="GamePad.cs" />
<Compile Include="GamePadCreator.cs" />
<Compile Include="KeyboardCreator.cs" />
<Compile Include="TouchPanel.cs" />
<Compile Include="TouchPanelCreator.cs" />
<Compile Include="MouseCreator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SupportedPlatformsImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_WindowsMetro.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
</Project>

View File

@ -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;
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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")]

View File

@ -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
};
}
}
}
}

View File

@ -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<TouchLocation>();
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
}
}

View File

@ -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();
}
}
}

View File

@ -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
@ -19,18 +13,13 @@ namespace ANX.InputDevices.Test
private Keyboard _keyboard;
private GamePad _gamePad;
public IGamePad GamePad
{
get
{
AddInSystemFactory.Instance.PreventSystemChange(
AddInType.InputSystem);
AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem);
if (_gamePad == null)
{
_gamePad = new GamePad();
}
return _gamePad;
}
}
@ -39,12 +28,9 @@ namespace ANX.InputDevices.Test
{
get
{
AddInSystemFactory.Instance.PreventSystemChange(
AddInType.InputSystem);
AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem);
if (_mouse == null)
{
_mouse = new Mouse();
}
return _mouse;
}
}
@ -53,39 +39,57 @@ namespace ANX.InputDevices.Test
{
get
{
AddInSystemFactory.Instance.PreventSystemChange(
AddInType.InputSystem);
AddInSystemFactory.Instance.PreventSystemChange(AddInType.InputSystem);
if (_keyboard == null)
{
_keyboard = new Keyboard();
}
return _keyboard;
}
}
public ITouchPanel TouchPanel
{
get
{
throw new NotImplementedException();
}
}
public IMotionSensingDevice MotionSensingDevice
{
get { throw new NotImplementedException(); }
get
{
throw new NotImplementedException();
}
}
public string Name
{
get
{
return "Test";
}
}
public int Priority
{
get
{
return int.MaxValue;
}
}
public bool IsSupported
{
get
{
// This is just for test, so it runs on all plattforms
return true;
}
}
public void RegisterCreator(AddInSystemFactory factory)
{
factory.AddCreator(this);
}
public string Name
{
get { return "Test"; }
}
public int Priority
{
get { return int.MaxValue; }
}
public bool IsSupported
{
get { return true; } //This is just for test, so it runs on all plattforms
}
}
}

View File

@ -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 void RegisterCreator(AddInSystemFactory factory)
{
factory.AddCreator(this);
}
public string Name
{
get { return "Recording"; }
get
{
return "Recording";
}
}
public int Priority
{
get { return int.MaxValue; }
get
{
return int.MaxValue;
}
}
public bool IsSupported
{
get { return true; } //This is just a proxy, so it runs on all plattforms
get
{
// This is just a proxy, so it runs on all plattforms
return true;
}
}
public void RegisterCreator(AddInSystemFactory factory)
{
factory.AddCreator(this);
}
}
}

View File

@ -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

View File

@ -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);
}
}
}

View File

@ -15,6 +15,9 @@ namespace ANX.InputSystem.Standard
{
return new PlatformName[]
{
PlatformName.Android,
PlatformName.IOS,
PlatformName.PSVita,
PlatformName.Linux,
PlatformName.MacOSX,
PlatformName.WindowsXP,

View File

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,9 +30,11 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
@ -47,6 +50,7 @@
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
@ -61,6 +65,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Creator.cs" />
<Compile Include="OpenALAudioListener.cs" />
<Compile Include="OpenALSoundEffect.cs" />
<Compile Include="OpenALSoundEffectInstance.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -21,6 +21,7 @@
<DefineConstants>TRACE;DEBUG;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,9 +30,11 @@
<DefineConstants>TRACE;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
@ -47,6 +50,7 @@
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
@ -61,6 +65,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Creator.cs" />
<Compile Include="OpenALAudioListener.cs" />
<Compile Include="OpenALSoundEffect.cs" />
<Compile Include="OpenALSoundEffectInstance.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -21,6 +21,7 @@
<DefineConstants>TRACE;DEBUG;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,9 +30,11 @@
<DefineConstants>TRACE;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
@ -47,6 +50,7 @@
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
@ -61,6 +65,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Creator.cs" />
<Compile Include="OpenALAudioListener.cs" />
<Compile Include="OpenALSoundEffect.cs" />
<Compile Include="OpenALSoundEffectInstance.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -23,6 +23,7 @@
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -31,9 +32,11 @@
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
@ -49,6 +52,7 @@
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
@ -63,6 +67,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Creator.cs" />
<Compile Include="OpenALAudioListener.cs" />
<Compile Include="OpenALSoundEffect.cs" />
<Compile Include="OpenALSoundEffectInstance.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -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

View File

@ -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
}
}