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. --- .../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 ++++++++ 10 files changed, 350 insertions(+) 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 (limited to 'WindowsPhone/JoystickTest') 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 -- cgit v1.2.3