summaryrefslogtreecommitdiff
path: root/WindowsPhone/JoystickTest
diff options
context:
space:
mode:
Diffstat (limited to 'WindowsPhone/JoystickTest')
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Background.pngbin0 -> 12776 bytes
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Game.icobin0 -> 4286 bytes
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Game1.cs103
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/JoystickTest.csproj107
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.pngbin0 -> 3176 bytes
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Program.cs21
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Properties/AppManifest.xml6
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Properties/AssemblyInfo.cs36
-rw-r--r--WindowsPhone/JoystickTest/JoystickTest/Properties/WMAppManifest.xml37
-rw-r--r--WindowsPhone/JoystickTest/JoystickTestContent/JoystickTestContent.contentproj40
10 files changed, 350 insertions, 0 deletions
diff --git a/WindowsPhone/JoystickTest/JoystickTest/Background.png b/WindowsPhone/JoystickTest/JoystickTest/Background.png
new file mode 100644
index 0000000..4af7a5f
--- /dev/null
+++ b/WindowsPhone/JoystickTest/JoystickTest/Background.png
Binary files differ
diff --git a/WindowsPhone/JoystickTest/JoystickTest/Game.ico b/WindowsPhone/JoystickTest/JoystickTest/Game.ico
new file mode 100644
index 0000000..8cff41e
--- /dev/null
+++ b/WindowsPhone/JoystickTest/JoystickTest/Game.ico
Binary files 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
+{
+ /// <summary>
+ /// This is the main type for your game
+ /// </summary>
+ 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);
+ }
+
+ /// <summary>
+ /// 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.
+ /// </summary>
+ protected override void Initialize()
+ {
+ // TODO: Add your initialization logic here
+
+ base.Initialize();
+ }
+
+ /// <summary>
+ /// LoadContent will be called once per game and is the place to load
+ /// all of your content.
+ /// </summary>
+ 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
+ }
+
+ /// <summary>
+ /// UnloadContent will be called once per game and is the place to unload
+ /// all content.
+ /// </summary>
+ protected override void UnloadContent()
+ {
+ // TODO: Unload any non ContentManager content here
+ }
+
+ /// <summary>
+ /// Allows the game to run logic such as updating the world,
+ /// checking for collisions, gathering input, and playing audio.
+ /// </summary>
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>
+ 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);
+ }
+
+ /// <summary>
+ /// This is called when the game should draw itself.
+ /// </summary>
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>
+ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{A709A813-BB79-4D69-B698-9EAD2FC58ADF}</ProjectGuid>
+ <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">Windows Phone</Platform>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>JoystickTest</RootNamespace>
+ <AssemblyName>JoystickTest</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+ <XnaPlatform>Windows Phone</XnaPlatform>
+ <XnaProfile>Reach</XnaProfile>
+ <XnaCrossPlatformGroupID>83ae46ff-59aa-4c3e-b3d8-8d5a22f8f846</XnaCrossPlatformGroupID>
+ <XnaOutputType>Game</XnaOutputType>
+ <XnaRefreshLevel>1</XnaRefreshLevel>
+ <WPTombstoneEnabled>false</WPTombstoneEnabled>
+ <XapFilename>$(AssemblyName).xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <XnaWindowsPhoneManifestTemplate>Properties\WMAppManifest.xml</XnaWindowsPhoneManifestTemplate>
+ <TileImage>Background.png</TileImage>
+ <TileTitle>JoystickTest</TileTitle>
+ <SupportedCultures>
+ </SupportedCultures>
+ <ApplicationIcon>Game.ico</ApplicationIcon>
+ <Thumbnail>PhoneGameThumb.png</Thumbnail>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Windows Phone' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Windows Phone\Debug</OutputPath>
+ <DefineConstants>DEBUG;TRACE;WINDOWS_PHONE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <NoStdLib>true</NoStdLib>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <XnaCompressContent>false</XnaCompressContent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Windows Phone' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Windows Phone\Release</OutputPath>
+ <DefineConstants>TRACE;WINDOWS_PHONE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <NoStdLib>true</NoStdLib>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <XnaCompressContent>false</XnaCompressContent>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Xna.Framework" />
+ <Reference Include="Microsoft.Xna.Framework.Game" />
+ <Reference Include="Microsoft.Xna.Framework.Graphics" />
+ <Reference Include="Microsoft.Xna.Framework.GamerServices" />
+ <Reference Include="Microsoft.Xna.Framework.Input.Touch" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Net" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <None Include="Properties\AppManifest.xml">
+ <XnaPlatformSpecific>true</XnaPlatformSpecific>
+ </None>
+ <None Include="Properties\WMAppManifest.xml">
+ <XnaPlatformSpecific>true</XnaPlatformSpecific>
+ </None>
+ <Compile Include="Program.cs" />
+ <Compile Include="Game1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Game.ico" />
+ <Content Include="PhoneGameThumb.png">
+ <XnaPlatformSpecific>true</XnaPlatformSpecific>
+ </Content>
+ <Content Include="Background.png">
+ <XnaPlatformSpecific>true</XnaPlatformSpecific>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Noddybox.Emulation.Xna.Joystick\Noddybox.Emulation.Xna.Joystick.csproj">
+ <Project>{0DFFE208-C204-4E95-8D09-7A0C08F06680}</Project>
+ <Name>Noddybox.Emulation.Xna.Joystick</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\JoystickTestContent\JoystickTestContent.contentproj">
+ <Name>JoystickTestContent</Name>
+ <XnaReferenceType>Content</XnaReferenceType>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.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> \ 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
--- /dev/null
+++ b/WindowsPhone/JoystickTest/JoystickTest/PhoneGameThumb.png
Binary files 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
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ 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 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
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 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
+ <App xmlns="" ProductID="{6080bdbc-f325-4187-9cbc-48004ab2bbf9}" Title="JoystickTest" RuntimeType="XNA" Version="1.0.0.0" Genre="Apps.Normal" Author="" Description="" Publisher="">
+ <IconPath IsRelative="true" IsResource="false"></IconPath>
+ <Capabilities>
+ <Capability Name="ID_CAP_NETWORKING" />
+ <Capability Name="ID_CAP_LOCATION" />
+ <Capability Name="ID_CAP_SENSORS" />
+ <Capability Name="ID_CAP_MICROPHONE" />
+ <Capability Name="ID_CAP_MEDIALIB" />
+ <Capability Name="ID_CAP_GAMERSERVICES" />
+ <Capability Name="ID_CAP_PHONEDIALER" />
+ <Capability Name="ID_CAP_PUSH_NOTIFICATION" />
+ <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+ <Capability Name="ID_CAP_IDENTITY_USER" />
+ <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+
+ <!-- Windows Phone OS 7.1 Capabilities -->
+ <Capability Name="ID_CAP_ISV_CAMERA" />
+ <Capability Name="ID_CAP_CONTACTS" />
+ <Capability Name="ID_CAP_APPOINTMENTS" />
+ </Capabilities>
+ <Tasks>
+ <DefaultTask Name="_default"/>
+ </Tasks>
+ <Tokens>
+ <PrimaryToken TokenID="JoystickTestToken" TaskName="_default">
+ <TemplateType5>
+ <BackgroundImageURI IsRelative="true" IsResource="false"></BackgroundImageURI>
+ <Count>0</Count>
+ <Title></Title>
+ </TemplateType5>
+ </PrimaryToken>
+ </Tokens>
+ </App>
+</Deployment>
+
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{0EDE15C8-F99E-45C6-837A-D35607A9DC10}</ProjectGuid>
+ <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+ <OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
+ <ContentRootDirectory>Content</ContentRootDirectory>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Windows Phone'">
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Windows Phone'">
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup>
+ <RootNamespace>JoystickTestContent</RootNamespace>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.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> \ No newline at end of file