diff -r c91a70b0149e8a270868386c10938a239dbb8fbb -r dbf354faa71f62d489544a5a9e5a04fe41d36811 axios/Axios_Windows.csproj.user --- a/axios/Axios_Windows.csproj.user Sat May 26 18:26:46 2012 -0500 +++ b/axios/Axios_Windows.csproj.user Sat May 26 18:36:11 2012 -0500 @@ -1,6 +1,6 @@  - ShowAllFiles + ProjectFiles \ No newline at end of file diff -r c91a70b0149e8a270868386c10938a239dbb8fbb -r dbf354faa71f62d489544a5a9e5a04fe41d36811 axios/Axios_settings.cs --- a/axios/Axios_settings.cs Sat May 26 18:26:46 2012 -0500 +++ b/axios/Axios_settings.cs Sat May 26 18:36:11 2012 -0500 @@ -91,6 +91,7 @@ * - Fixing bug where loadrecentangleitem wouldn't be called by Gleed2D library * - Changing AxiosTitleFile.GetStream() to return Stream instead of FileStream * - Changing IAxiosFile.GetStream() to return Stream instead of FileStream + * - Adding support for XNACC * */ #endregion diff -r c91a70b0149e8a270868386c10938a239dbb8fbb -r dbf354faa71f62d489544a5a9e5a04fe41d36811 axios/ScreenSystem/InputState.cs --- a/axios/ScreenSystem/InputState.cs Sat May 26 18:26:46 2012 -0500 +++ b/axios/ScreenSystem/InputState.cs Sat May 26 18:36:11 2012 -0500 @@ -15,6 +15,11 @@ using FarseerPhysics.SamplesFramework; using Microsoft.Xna.Framework.Graphics; using System; +#if WINDOWS +using XNACC.BaseTypes; +#endif +using System.Linq; + namespace GameStateManagement { @@ -37,8 +42,46 @@ /// query methods for high level input actions such as "move up through the menu" /// or "pause the game". /// +#if WINDOWS + public class InputState : IConsoleKeyboard +#else public class InputState +#endif { + +#if WINDOWS + #region XNACC + /* + * These are needed for XNACC + * -- Nathan Adams [adamsna@datanethost.net] - 5/26/2012 + */ + + private KeyboardState KeyState; + private List newlyPressedKeys = new List(); + private List heldKeys = new List(); + private Keys[] oldPressedKeys; + private Keys[] newPressedKeys; + + public KeyboardState CurrentKeyboardState + { + get { return KeyState; } + } + + public IList NewlyPressedKeys + { + get { return newlyPressedKeys; } + } + + public IList HeldKeys + { + get { return heldKeys; } + } + + /* + * End XNACC variables + */ + #endregion +#endif public const int MaxInputs = 4; public readonly KeyboardState[] CurrentKeyboardStates; @@ -270,6 +313,27 @@ /// public void Update(GameTime gameTime) { + +#if WINDOWS + #region XNACC + KeyState = Keyboard.GetState(); + + oldPressedKeys = newPressedKeys; + newPressedKeys = KeyState.GetPressedKeys(); + + newlyPressedKeys.Clear(); + heldKeys.Clear(); + + foreach (Keys key in newPressedKeys) + { + if (oldPressedKeys.Contains(key)) + heldKeys.Add(key); + else + newlyPressedKeys.Add(key); + } + #endregion +#endif + //PlayerIndex p; _lastMouseState = _currentMouseState; if (_handleVirtualStick) diff -r c91a70b0149e8a270868386c10938a239dbb8fbb -r dbf354faa71f62d489544a5a9e5a04fe41d36811 axios/XNACC/CommandConsoleBase.cs --- a/axios/XNACC/CommandConsoleBase.cs Sat May 26 18:26:46 2012 -0500 +++ b/axios/XNACC/CommandConsoleBase.cs Sat May 26 18:36:11 2012 -0500 @@ -11,7 +11,7 @@ using System.IO; using System.ComponentModel; using System.Reflection; -using JRTS.XNA.Console.BaseTypes; +using XNACC.BaseTypes; using System.Diagnostics; #endif #endregion @@ -71,7 +71,7 @@ //NA: Seriously Microsoft? #if WINDOWS /// Namespace that contains code related to the XNACC (CommandConsole) component -namespace JRTS.XNA.Console +namespace XNACC.Console { /// Base functionality of the XNACC (CommandConsole) component public class CommandConsoleBase : DrawableGameComponent diff -r c91a70b0149e8a270868386c10938a239dbb8fbb -r dbf354faa71f62d489544a5a9e5a04fe41d36811 axios/XNACC/CommandConsoleBaseSharedTypes.cs --- a/axios/XNACC/CommandConsoleBaseSharedTypes.cs Sat May 26 18:26:46 2012 -0500 +++ b/axios/XNACC/CommandConsoleBaseSharedTypes.cs Sat May 26 18:36:11 2012 -0500 @@ -6,7 +6,7 @@ #if WINDOWS /// Namespace that contains shared types related to the XNACC (CommandConsole) component -namespace JRTS.XNA.Console.BaseTypes +namespace XNACC.BaseTypes { #region IConsoleKeyboard /// Basic keyboard/input functionality required by the CommandConsole(Base) class