From df8eab9483a3b697a70446062e139e95c402674b Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 22 May 2012 22:05:17 +0000 Subject: Added some base source files for the joystick and joystick test. --- Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo | Bin 51712 -> 51712 bytes WindowsPhone/JoystickTest.sln | 32 ++++ .../JoystickTest/JoystickTest/Background.png | Bin 0 -> 12776 bytes WindowsPhone/JoystickTest/JoystickTest/Game.ico | Bin 0 -> 4286 bytes WindowsPhone/JoystickTest/JoystickTest/Game1.cs | 103 ++++++++++++ .../JoystickTest/JoystickTest/JoystickTest.csproj | 107 +++++++++++++ .../JoystickTest/JoystickTest/PhoneGameThumb.png | Bin 0 -> 3176 bytes WindowsPhone/JoystickTest/JoystickTest/Program.cs | 21 +++ .../JoystickTest/Properties/AppManifest.xml | 6 + .../JoystickTest/Properties/AssemblyInfo.cs | 36 +++++ .../JoystickTest/Properties/WMAppManifest.xml | 37 +++++ .../JoystickTestContent.contentproj | 40 +++++ WindowsPhone/KeyboardTest.suo | Bin 47616 -> 48128 bytes .../Noddybox.Emulation.Xna.Joystick.csproj | 80 ++++++++++ .../Properties/AssemblyInfo.cs | 36 +++++ .../JoystickDriver.cs | 177 +++++++++++++++++++++ .../JoystickState.cs | 43 +++++ 17 files changed, 718 insertions(+) create mode 100644 WindowsPhone/JoystickTest.sln create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Background.png create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Game.ico create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Game1.cs create mode 100644 WindowsPhone/JoystickTest/JoystickTest/JoystickTest.csproj create mode 100644 WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.png create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Program.cs create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Properties/AppManifest.xml create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Properties/AssemblyInfo.cs create mode 100644 WindowsPhone/JoystickTest/JoystickTest/Properties/WMAppManifest.xml create mode 100644 WindowsPhone/JoystickTest/JoystickTestContent/JoystickTestContent.contentproj create mode 100644 WindowsPhone/Noddybox.Emulation.Xna.Joystick/Noddybox.Emulation.Xna.Joystick.csproj create mode 100644 WindowsPhone/Noddybox.Emulation.Xna.Joystick/Properties/AssemblyInfo.cs create mode 100644 src/Noddybox.Emulation.Xna.Joystick/JoystickDriver.cs create mode 100644 src/Noddybox.Emulation.Xna.Joystick/JoystickState.cs diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo index c832963..72f0139 100644 Binary files a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo and b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo differ diff --git a/WindowsPhone/JoystickTest.sln b/WindowsPhone/JoystickTest.sln new file mode 100644 index 0000000..f0a0b38 --- /dev/null +++ b/WindowsPhone/JoystickTest.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Express for Windows Phone +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JoystickTest", "JoystickTest\JoystickTest\JoystickTest.csproj", "{A709A813-BB79-4D69-B698-9EAD2FC58ADF}" +EndProject +Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "JoystickTestContent", "JoystickTest\JoystickTestContent\JoystickTestContent.contentproj", "{0EDE15C8-F99E-45C6-837A-D35607A9DC10}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Noddybox.Emulation.Xna.Joystick", "Noddybox.Emulation.Xna.Joystick\Noddybox.Emulation.Xna.Joystick.csproj", "{0DFFE208-C204-4E95-8D09-7A0C08F06680}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Phone = Debug|Windows Phone + Release|Windows Phone = Release|Windows Phone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Debug|Windows Phone.Deploy.0 = Debug|Windows Phone + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Release|Windows Phone.Build.0 = Release|Windows Phone + {A709A813-BB79-4D69-B698-9EAD2FC58ADF}.Release|Windows Phone.Deploy.0 = Release|Windows Phone + {0EDE15C8-F99E-45C6-837A-D35607A9DC10}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {0EDE15C8-F99E-45C6-837A-D35607A9DC10}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {0DFFE208-C204-4E95-8D09-7A0C08F06680}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {0DFFE208-C204-4E95-8D09-7A0C08F06680}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {0DFFE208-C204-4E95-8D09-7A0C08F06680}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {0DFFE208-C204-4E95-8D09-7A0C08F06680}.Release|Windows Phone.Build.0 = Release|Windows Phone + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WindowsPhone/JoystickTest/JoystickTest/Background.png b/WindowsPhone/JoystickTest/JoystickTest/Background.png new file mode 100644 index 0000000..4af7a5f Binary files /dev/null and b/WindowsPhone/JoystickTest/JoystickTest/Background.png differ diff --git a/WindowsPhone/JoystickTest/JoystickTest/Game.ico b/WindowsPhone/JoystickTest/JoystickTest/Game.ico new file mode 100644 index 0000000..8cff41e Binary files /dev/null and b/WindowsPhone/JoystickTest/JoystickTest/Game.ico differ diff --git a/WindowsPhone/JoystickTest/JoystickTest/Game1.cs b/WindowsPhone/JoystickTest/JoystickTest/Game1.cs new file mode 100644 index 0000000..a5f8be3 --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/Game1.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.GamerServices; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework.Input.Touch; +using Microsoft.Xna.Framework.Media; + +namespace JoystickTest +{ + /// + /// This is the main type for your game + /// + public class Game1 : Microsoft.Xna.Framework.Game + { + GraphicsDeviceManager graphics; + SpriteBatch spriteBatch; + + public Game1() + { + graphics = new GraphicsDeviceManager(this); + graphics.PreferredBackBufferWidth = 480; + graphics.PreferredBackBufferHeight = 800; + + //graphics.SupportedOrientations = DisplayOrientation.Portrait; + + Content.RootDirectory = "Content"; + + // Frame rate is 30 fps by default for Windows Phone. + TargetElapsedTime = TimeSpan.FromTicks(333333); + + // Extend battery life under lock. + InactiveSleepTime = TimeSpan.FromSeconds(1); + } + + /// + /// Allows the game to perform any initialization it needs to before starting to run. + /// This is where it can query for any required services and load any non-graphic + /// related content. Calling base.Initialize will enumerate through any components + /// and initialize them as well. + /// + protected override void Initialize() + { + // TODO: Add your initialization logic here + + base.Initialize(); + } + + /// + /// LoadContent will be called once per game and is the place to load + /// all of your content. + /// + protected override void LoadContent() + { + // Create a new SpriteBatch, which can be used to draw textures. + spriteBatch = new SpriteBatch(GraphicsDevice); + + // TODO: use this.Content to load your game content here + } + + /// + /// UnloadContent will be called once per game and is the place to unload + /// all content. + /// + protected override void UnloadContent() + { + // TODO: Unload any non ContentManager content here + } + + /// + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// + /// Provides a snapshot of timing values. + protected override void Update(GameTime gameTime) + { + // Allows the game to exit + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) + this.Exit(); + + // TODO: Add your update logic here + + base.Update(gameTime); + } + + /// + /// This is called when the game should draw itself. + /// + /// Provides a snapshot of timing values. + protected override void Draw(GameTime gameTime) + { + GraphicsDevice.Clear(Color.CornflowerBlue); + + // TODO: Add your drawing code here + + base.Draw(gameTime); + } + } +} diff --git a/WindowsPhone/JoystickTest/JoystickTest/JoystickTest.csproj b/WindowsPhone/JoystickTest/JoystickTest/JoystickTest.csproj new file mode 100644 index 0000000..37cdf3e --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/JoystickTest.csproj @@ -0,0 +1,107 @@ + + + + {A709A813-BB79-4D69-B698-9EAD2FC58ADF} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + Windows Phone + Library + Properties + JoystickTest + JoystickTest + v4.0 + Client + v4.0 + Windows Phone + Reach + 83ae46ff-59aa-4c3e-b3d8-8d5a22f8f846 + Game + 1 + false + $(AssemblyName).xap + Properties\AppManifest.xml + Properties\WMAppManifest.xml + Background.png + JoystickTest + + + Game.ico + PhoneGameThumb.png + + + true + full + false + bin\Windows Phone\Debug + DEBUG;TRACE;WINDOWS_PHONE + prompt + 4 + true + false + false + + + pdbonly + true + bin\Windows Phone\Release + TRACE;WINDOWS_PHONE + prompt + 4 + true + false + false + + + + + + + + + + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + + {0DFFE208-C204-4E95-8D09-7A0C08F06680} + Noddybox.Emulation.Xna.Joystick + + + JoystickTestContent + Content + + + + + + \ No newline at end of file diff --git a/WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.png b/WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.png new file mode 100644 index 0000000..a45f4db Binary files /dev/null and b/WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.png differ diff --git a/WindowsPhone/JoystickTest/JoystickTest/Program.cs b/WindowsPhone/JoystickTest/JoystickTest/Program.cs new file mode 100644 index 0000000..561b942 --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/Program.cs @@ -0,0 +1,21 @@ +using System; + +namespace JoystickTest +{ +#if WINDOWS || XBOX + static class Program + { + /// + /// The main entry point for the application. + /// + static void Main(string[] args) + { + using (Game1 game = new Game1()) + { + game.Run(); + } + } + } +#endif +} + diff --git a/WindowsPhone/JoystickTest/JoystickTest/Properties/AppManifest.xml b/WindowsPhone/JoystickTest/JoystickTest/Properties/AppManifest.xml new file mode 100644 index 0000000..a955232 --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/Properties/AppManifest.xml @@ -0,0 +1,6 @@ + + + + diff --git a/WindowsPhone/JoystickTest/JoystickTest/Properties/AssemblyInfo.cs b/WindowsPhone/JoystickTest/JoystickTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3964eea --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Resources; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("JoystickTest")] +[assembly: AssemblyProduct("JoystickTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. Only Windows +// assemblies support COM. +[assembly: ComVisible(false)] + +// On Windows, the following GUID is for the ID of the typelib if this +// project is exposed to COM. On other platforms, it unique identifies the +// title storage container when deploying this assembly to the device. +[assembly: Guid("6080bdbc-f325-4187-9cbc-48004ab2bbf9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en-US")] \ No newline at end of file diff --git a/WindowsPhone/JoystickTest/JoystickTest/Properties/WMAppManifest.xml b/WindowsPhone/JoystickTest/JoystickTest/Properties/WMAppManifest.xml new file mode 100644 index 0000000..7d3295b --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTest/Properties/WMAppManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + diff --git a/WindowsPhone/JoystickTest/JoystickTestContent/JoystickTestContent.contentproj b/WindowsPhone/JoystickTest/JoystickTestContent/JoystickTestContent.contentproj new file mode 100644 index 0000000..4ae643c --- /dev/null +++ b/WindowsPhone/JoystickTest/JoystickTestContent/JoystickTestContent.contentproj @@ -0,0 +1,40 @@ + + + + {0EDE15C8-F99E-45C6-837A-D35607A9DC10} + {96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + x86 + Library + Properties + v4.0 + v4.0 + bin\$(Platform)\$(Configuration) + Content + + + x86 + + + x86 + + + JoystickTestContent + + + + + + + + + + + + \ No newline at end of file diff --git a/WindowsPhone/KeyboardTest.suo b/WindowsPhone/KeyboardTest.suo index 9d8aa7e..cf0b493 100644 Binary files a/WindowsPhone/KeyboardTest.suo and b/WindowsPhone/KeyboardTest.suo differ diff --git a/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Noddybox.Emulation.Xna.Joystick.csproj b/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Noddybox.Emulation.Xna.Joystick.csproj new file mode 100644 index 0000000..bd97932 --- /dev/null +++ b/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Noddybox.Emulation.Xna.Joystick.csproj @@ -0,0 +1,80 @@ + + + + {0DFFE208-C204-4E95-8D09-7A0C08F06680} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + Windows Phone + Library + Properties + Noddybox.Emulation.Xna.Joystick + Noddybox.Emulation.Xna.Joystick + v4.0 + Client + v4.0 + Windows Phone + Reach + 20897ae2-4e23-452c-9b11-3a423d7ecaae + Library + 1 + + + true + full + false + bin\Windows Phone\Debug + DEBUG;TRACE;WINDOWS_PHONE + prompt + 4 + true + false + false + + + pdbonly + true + bin\Windows Phone\Release + TRACE;WINDOWS_PHONE + prompt + 4 + true + false + false + + + + + + + + + + + + 4.0 + + + 4.0 + + + + + + JoystickDriver.cs + + + JoystickState.cs + + + + + + + \ No newline at end of file diff --git a/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Properties/AssemblyInfo.cs b/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..747acbc --- /dev/null +++ b/WindowsPhone/Noddybox.Emulation.Xna.Joystick/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Resources; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Noddybox.Emulation.Xna.Joystick")] +[assembly: AssemblyProduct("Noddybox.Emulation.Xna.Joystick")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. Only Windows +// assemblies support COM. +[assembly: ComVisible(false)] + +// On Windows, the following GUID is for the ID of the typelib if this +// project is exposed to COM. On other platforms, it unique identifies the +// title storage container when deploying this assembly to the device. +[assembly: Guid("570d1cb2-07b0-4b3d-bf45-d387c7aeb817")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en-US")] \ No newline at end of file diff --git a/src/Noddybox.Emulation.Xna.Joystick/JoystickDriver.cs b/src/Noddybox.Emulation.Xna.Joystick/JoystickDriver.cs new file mode 100644 index 0000000..f0d2b63 --- /dev/null +++ b/src/Noddybox.Emulation.Xna.Joystick/JoystickDriver.cs @@ -0,0 +1,177 @@ +// This file is part of the Noddybox.Emulation C# suite. +// +// Noddybox.Emulation is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Noddybox.Emulation is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Noddybox.Emulation. If not, see . +// +// Copyright (c) 2012 Ian Cowburn +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input.Touch; + +namespace Noddybox.Emulation.Xna.Joystick +{ + /// + /// Displays and drives the joystick. Unlike the keyboard this is not + /// not done event driven, but as a clasic Joystick interface. + /// + public class JoystickDriver + { + #region Private data + + private Texture2D backgroundImage; + private Texture2D joystickImage; + private Texture2D buttonImage; + private Vector2 position; + private JoystickState state; + + #endregion + + #region Private members + + #endregion + + #region Public properties + + /// + /// Get the current state of the joystick and fire buttons. + /// + public JoystickState State {get {return state;}} + + #endregion + + #region Public members + + /// + /// Updates the keyboard. Note that this will consume all the key press events. + /// + public void Update() + { + foreach (TouchLocation t in TouchPanel.GetState()) + { + // int x = (int)t.Position.X; + // int y = (int)t.Position.Y; + // int f = 0; + // KeyState key = null; + + + // if (t.State == TouchLocationState.Pressed) + // { + // for(f = 0; f < keymapSize && key == null; f++) + // { + // if (keymapPos[f].Contains(x, y)) + // { + // key = keymapState[f]; + // } + // } + + // if (key != null) + // { + // key.TouchId = t.Id; + + // if (key.IsSticky) + // { + // key.IsPressed = !key.IsPressed; + // } + // else + // { + // key.IsPressed = true; + // } + + // if (KeyEvent != null) + // { + // KeyEvent(this, new KeyPressEventArgs() {Key = key.Symbol, Pressed = key.IsPressed}); + // } + // } + // } + // else if (t.State == TouchLocationState.Released) + // { + // for(f = 0; f < keymapSize && key == null; f++) + // { + // if (keymapState[f].TouchId == t.Id) + // { + // key = keymapState[f]; + // } + // } + + // if (key != null) + // { + // if (!key.IsSticky) + // { + // key.IsPressed = false; + + // if (KeyEvent != null) + // { + // KeyEvent(this, new KeyPressEventArgs() {Key = key.Symbol, Pressed = key.IsPressed}); + // } + // } + // } + // } + + // // If no key handled, pass on the event + // // + // if (key == null && keymapState.Where(r => r.TouchId == t.Id).Count() == 0) + // { + // if (TouchEvent != null) + // { + // TouchEvent(this, new TouchLocationEventArgs() {Location = t}); + // } + // } + } + } + + /// + /// Draw the keyboard + /// + /// + public void Draw(SpriteBatch spriteBatch) + { + //spriteBatch.Draw(image, position, Color.White); + + //for(int f = 0; f < keymapSize; f++) + //{ + // if (keymapState[f].IsPressed) + // { + // spriteBatch.Draw(overlay, keymapPos[f], new Color(200, 200, 0, 25)); + // } + //} + } + + #endregion + + #region Constructors + + /// + /// Constructor. + /// + /// The graphics device to associate textures with. + /// The image for the joystick background. + /// The image for the joystick knob. + /// The image for a joystick button. + /// Where to draw and offset the joystick to. + public JoystickDriver(GraphicsDevice graphics, Texture2D backgroundImage, Texture2D joystickImage, Texture2D buttonImage, Vector2 position) + { + this.backgroundImage = backgroundImage; + this.joystickImage = joystickImage; + this.buttonImage = buttonImage; + this.position = position; + this.state = JoystickState.None; + } + + #endregion + } +} diff --git a/src/Noddybox.Emulation.Xna.Joystick/JoystickState.cs b/src/Noddybox.Emulation.Xna.Joystick/JoystickState.cs new file mode 100644 index 0000000..97219bc --- /dev/null +++ b/src/Noddybox.Emulation.Xna.Joystick/JoystickState.cs @@ -0,0 +1,43 @@ +// This file is part of the Noddybox.Emulation C# suite. +// +// Noddybox.Emulation is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Noddybox.Emulation is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Noddybox.Emulation. If not, see . +// +// Copyright (c) 2012 Ian Cowburn +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input.Touch; + +namespace Noddybox.Emulation.Xna.Joystick +{ + /// + /// Defines the state of the joystick. + /// + public enum JoystickState + { + None = 0x00, + Up = 0x01, + Down = 0x02, + Left = 0x04, + Right = 0x08, + Fire1 = 0x10, + Fire2 = 0x20, + Fire3 = 0x40, + Fire4 = 0x80 + } +} -- cgit v1.2.3