diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/ANX.InputSystems.Windows.Recording.csproj b/InputSystems/ANX.InputSystems.Windows.Recording/ANX.InputSystems.Windows.Recording.csproj deleted file mode 100644 index caeb2abf..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/ANX.InputSystems.Windows.Recording.csproj +++ /dev/null @@ -1,76 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} - Library - Properties - ANX.InputSystems.Windows.Recording - ANX.InputSystems.Windows.Recording - v4.0 - 512 - - - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - Metadata.resx - True - True - - - - - - - - - - - - {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} - ANX.Framework - - - - - PublicResXFileCodeGenerator - Metadata.Designer.cs - - - - - \ No newline at end of file diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/Creator.cs b/InputSystems/ANX.InputSystems.Windows.Recording/Creator.cs deleted file mode 100644 index eb0843c0..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/Creator.cs +++ /dev/null @@ -1,106 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ANX.Framework.NonXNA; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - public class Creator : IInputSystemCreator - { - public IGamePad GamePad - { - get { return new RecordingGamePad(); } - } - - public IMouse Mouse - { - get { return new RecordingMouse(); } - } - - public IKeyboard Keyboard - { - get { return new RecordingKeyboard(); } - } - - public IMotionSensingDevice MotionSensingDevice - { - get { return new RecordingMotionSensingDevice(); } - } - - 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 - { - //TODO: this is just a very basic version of test for support - return AddInSystemFactory.Instance.OperatingSystem.Platform == PlatformID.Win32NT; - } - } - - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.Designer.cs b/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.Designer.cs deleted file mode 100644 index 7f23c917..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.239 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace ANX.Framework.Windows.DX10 { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Metadata { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Metadata() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ANX.Framework.Windows.DX10.Metadata", typeof(Metadata).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Win32NT ähnelt. - /// - public static string SupportedPlatforms { - get { - return ResourceManager.GetString("SupportedPlatforms", resourceCulture); - } - } - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.resx b/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.resx deleted file mode 100644 index c90f8c84..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/Metadata.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Win32NT - - \ No newline at end of file diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/Properties/AssemblyInfo.cs b/InputSystems/ANX.InputSystems.Windows.Recording/Properties/AssemblyInfo.cs deleted file mode 100644 index a6c23285..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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.InputSystems.Windows.Recording")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("ANX.Framework Team")] -[assembly: AssemblyProduct("ANX.InputSystems.Windows.Recording")] -[assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2011")] -[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("cbb5cead-130a-4ede-9257-8fc816f95935")] - -// 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("0.0.1.0")] -[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordableDevice.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordableDevice.cs deleted file mode 100644 index 34f16fae..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordableDevice.cs +++ /dev/null @@ -1,197 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - /// - /// Abstract Class. Classes derived from this class allow recording and Playback of Inputs. - /// - public abstract class RecordableDevice - { - protected Stream recordStream; //The stream where the input is written to - protected int nullStateCounter; //Used to sum up frames with no input. - - public RecordingState RecordingState { get; protected set; } - - public event EventHandler EndOfPlaybackReached; - - /// - /// How many bytes this Instance requires per Frame. Must never change! - /// - public int FramePacketLenght { get; protected set; } - - public RecordableDevice() - { - RecordingState = RecordingState.None; - } - - /// - /// Initializes the Device using a new - /// MemoryStream for input-buffering. - /// - public virtual void Initialize() - { - Initialize(new MemoryStream()); - } - - /// - /// Initializes the Device using the specified stream - /// for input-buffering. - /// - public virtual void Initialize(Stream bufferStream) - { - recordStream = bufferStream; - } - - public virtual void StartRecording() - { - if (RecordingState == RecordingState.Recording) - return; - - RecordingState = RecordingState.Recording; - } - - public virtual void StopRecording() - { - if (RecordingState != RecordingState.Recording) - throw new InvalidOperationException("Recording wasn't started for this device!"); - - RecordingState = RecordingState.None; - } - - public virtual void StartPlayback() - { - if (RecordingState == RecordingState.Recording) - throw new InvalidOperationException("Recording is currently running for this device."); - - RecordingState = RecordingState.Playback; - } - - public virtual void StopPlayback() - { - RecordingState = RecordingState.None; - } - - /// - /// Writes the current input state to the buffering stream. Pass null - /// for state, if no input is done (no keys down etc.). - /// Must be called once per Frame! - /// - protected virtual void WriteState(byte[] state) - { - if (state == null) - { - nullStateCounter++; - return; - } - - if (state.Length != FramePacketLenght) - throw new InvalidOperationException("The passed state's lenght does not match the speficed FramePaketLenght."); - - if (nullStateCounter > 0) //Note how many packets we had nothing - { - recordStream.WriteByte((byte)PacketType.NullFrameCounter); - recordStream.Write(BitConverter.GetBytes(nullStateCounter), 0, 4); - } - - recordStream.WriteByte((byte)PacketType.InputData); - recordStream.Write(state, 0, state.Length); - } - - /// - /// Reads the next input-state from the buffering stream. Might - /// return null, if no input was made in this frame. - /// Must be called once per Frame! - /// - protected virtual byte[] ReadState() - { - if (nullStateCounter > 0) //we have null-states pending - { - nullStateCounter--; - return null; - } - - if (recordStream.Position == recordStream.Length) - { - OnEndOfPlaybackReached(); - return null; //TODO: Better switch to RecordingState.None here? - } - - PacketType type = (PacketType)recordStream.ReadByte(); - switch (type) - { - case PacketType.NullFrameCounter: - byte[] buffer = new byte[4]; - recordStream.Read(buffer, 0, 4); - nullStateCounter = BitConverter.ToInt32(buffer, 0) - 1; - return null; - case PacketType.InputData: - byte[] buffer2 = new byte[FramePacketLenght]; - recordStream.Read(buffer2, 0, FramePacketLenght); - return buffer2; - default: - throw new NotImplementedException("The PaketType " + Enum.GetName(typeof(PacketType), type) + "is not supported."); - } - - } - - protected virtual void OnEndOfPlaybackReached() - { - if (EndOfPlaybackReached != null) - EndOfPlaybackReached(this, EventArgs.Empty); - } - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingGamePad.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordingGamePad.cs deleted file mode 100644 index 3e7ee303..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingGamePad.cs +++ /dev/null @@ -1,86 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ANX.Framework.NonXNA; -using ANX.Framework.Input; -using ANX.Framework; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - /// - /// Wrapper arround another IGamePad, will record all inputs and allows playback. - /// - public class RecordingGamePad : RecordableDevice, IGamePad - { - public GamePadCapabilities GetCapabilities(PlayerIndex playerIndex) - { - throw new NotImplementedException(); - } - - public GamePadState GetState(PlayerIndex playerIndex, out bool isConnected, out int packetNumber) - { - throw new NotImplementedException(); - } - - public GamePadState GetState(PlayerIndex playerIndex, Framework.Input.GamePadDeadZone deadZoneMode, out bool isConnected, out int packetNumber) - { - throw new NotImplementedException(); - } - - public bool SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor) - { - throw new NotImplementedException(); - } - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingHelper.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordingHelper.cs deleted file mode 100644 index 130202f6..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingHelper.cs +++ /dev/null @@ -1,87 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - public enum RecordingState - { - /// - /// This device is recording input. - /// - Recording, - /// - /// This device plays back recorded input. - /// - Playback, - /// - /// Playback and Recording paused, the current values will be passed through. - /// - None - } - - enum PacketType : byte - { - NullFrameCounter = 0, - InputData = 1 - } - - /// - /// Static Helper-class containing some recording related stuff. - /// - static class RecordingHelper - { - - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingKeyboard.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordingKeyboard.cs deleted file mode 100644 index a52a2e8f..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingKeyboard.cs +++ /dev/null @@ -1,82 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ANX.Framework.NonXNA; -using ANX.Framework; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - /// - /// Wrapper arround another IKeyboard, will record all inputs and allows playback. - /// - public class RecordingKeyboard : RecordableDevice, IKeyboard - { - public IntPtr WindowHandle { get; set; } - - public Framework.Input.KeyboardState GetState() - { - throw new NotImplementedException(); - } - - public Framework.Input.KeyboardState GetState(PlayerIndex playerIndex) - { - throw new NotImplementedException(); - } - - public void Dispose() - { - throw new NotImplementedException(); - } - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMotionSensingDevice.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMotionSensingDevice.cs deleted file mode 100644 index 8982f7e2..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMotionSensingDevice.cs +++ /dev/null @@ -1,93 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ANX.Framework.NonXNA; -using ANX.Framework.Graphics; -using ANX.Framework.Input.MotionSensing; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - /// - /// Wrapper aroung another IMotionSensingDevice, will record all inputs and allows playback. - /// - public class RecordingMotionSensingDevice : RecordableDevice, IMotionSensingDevice - { - public GraphicsDevice GraphicsDevice - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } - - public MotionSensingDeviceType DeviceType - { - get { throw new NotImplementedException(); } - } - - public MotionSensingDeviceState GetState() - { - throw new NotImplementedException(); - } - - public void Dispose() - { - throw new NotImplementedException(); - } - } -} diff --git a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMouse.cs b/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMouse.cs deleted file mode 100644 index 070d2784..00000000 --- a/InputSystems/ANX.InputSystems.Windows.Recording/RecordingMouse.cs +++ /dev/null @@ -1,130 +0,0 @@ -#region Using Statements -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ANX.Framework.NonXNA; -using ANX.Framework.Input; -using System.IO; - -#endregion - -#region License - -// -// This file is part of the ANX.Framework created by the "ANX.Framework developer group". -// -// This file is released under the Ms-PL license. -// -// -// -// Microsoft Public License (Ms-PL) -// -// This license governs use of the accompanying software. If you use the software, you accept this license. -// If you do not accept the license, do not use the software. -// -// 1.Definitions -// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning -// here as under U.S. copyright law. -// A "contribution" is the original software, or any additions or changes to the software. -// A "contributor" is any person that distributes its contribution under this license. -// "Licensed patents" are a contributor's patent claims that read directly on its contribution. -// -// 2.Grant of Rights -// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations -// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to -// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution -// or any derivative works that you create. -// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in -// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed -// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution -// in the software or derivative works of the contribution in the software. -// -// 3.Conditions and Limitations -// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your -// patent license from such contributor to the software ends automatically. -// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution -// notices that are present in the software. -// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including -// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or -// object code form, you may only do so under a license that complies with this license. -// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, -// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the -// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a -// particular purpose and non-infringement. - -#endregion // License - -namespace ANX.InputSystem.Windows.Recording -{ - [Flags] - public enum MouseRecordInfo : byte - { - LeftButton = 1, - RightButton = 2, - MiddleButton = 4, - X1Button = 8, - X2Button = 16, - ScrollWheel = 32, - XPosition = 64, - YPosition = 128, - LRMButtons = LeftButton | RightButton | MiddleButton, - XButtons = X1Button | X2Button, - AllButtons = LRMButtons | XButtons, - Position = XPosition | YPosition, - All = AllButtons | Position | ScrollWheel - } - - /// - /// Wrapper arround another IGamePad, will record all inputs and allows playback. - /// - public class RecordingMouse : RecordableDevice, IMouse - { - public IntPtr WindowHandle { get; set; } - - public MouseState GetState() - { - throw new NotImplementedException(); - } - - public void SetPosition(int x, int y) - { - throw new NotImplementedException(); - } - - public void Initialize(MouseRecordInfo info) - { - base.Initialize(); - } - - public void Initialize(MouseRecordInfo info, Stream bufferStream) - { - base.Initialize(bufferStream); - } - - private int GetPaketSize(MouseRecordInfo info) - { - int ret = 0; //TODO: Pack the bools in one byte to save space sizeof(bool) == sizeof(byte)! - if (info.HasFlag(MouseRecordInfo.LeftButton)) - ret += sizeof(bool); - if (info.HasFlag(MouseRecordInfo.RightButton)) - ret += sizeof(bool); - if (info.HasFlag(MouseRecordInfo.MiddleButton)) - ret += sizeof(bool); - if (info.HasFlag(MouseRecordInfo.X1Button)) - ret += sizeof(bool); - if (info.HasFlag(MouseRecordInfo.X2Button)) - ret += sizeof(bool); - - if (info.HasFlag(MouseRecordInfo.XPosition)) - ret += sizeof(int); - if (info.HasFlag(MouseRecordInfo.YPosition)) - ret += sizeof(int); - if (info.HasFlag(MouseRecordInfo.ScrollWheel)) - ret += sizeof(int); - - return ret; - } - } -}