-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Don Naegely
committed
Feb 6, 2014
1 parent
57338af
commit 5e17993
Showing
106 changed files
with
30,782 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Xna.Framework.Input; | ||
|
||
using System.Text; | ||
|
||
namespace TheraWii | ||
{ | ||
class BalanceBoardState : WiiControllerState | ||
{ | ||
public ButtonState button; | ||
public float frontLeft; | ||
public float frontRight; | ||
public float backLeft; | ||
public float backRight; | ||
|
||
public BalanceBoardState() | ||
{ | ||
|
||
} | ||
|
||
public void Initialize() | ||
{ | ||
frontLeft = 0.0f; //measured in kg | ||
frontRight = 0.0f; //measured in kg | ||
backLeft = 0.0f; //measured in kg | ||
backRight = 0.0f; //measured in kg | ||
connected = false; | ||
button = ButtonState.Released; | ||
} | ||
|
||
public double getWeight() | ||
{ | ||
return frontLeft + frontRight + backLeft + backRight; //measured in kg | ||
} | ||
|
||
public Boolean connected; | ||
public Boolean isConnected() | ||
{ | ||
return connected; | ||
} | ||
|
||
internal BalanceBoardState Copy() | ||
{ | ||
return (BalanceBoardState)this.MemberwiseClone(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
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.Net; | ||
using Microsoft.Xna.Framework.Storage; | ||
|
||
namespace TheraWii | ||
{ | ||
class Basketball : Ellipsoid | ||
{ | ||
private Vector3 _scale; | ||
//private Vector3 ambient; | ||
//private Texture2D bbalTex; | ||
|
||
public Basketball(GraphicsDeviceManager g, ContentManager c, Vector3 position, Vector3 scale, Color color) | ||
{ | ||
this.Scale = 0.1f*scale; | ||
this.Position = position; | ||
//this.color = new Vector3(0.8f, 0.4f, 0.0f); | ||
//this.ambient = new Vector3(0.4f, 0.4f, 0.4f); | ||
|
||
graphics = g; | ||
Content = c; | ||
|
||
aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio; | ||
|
||
ellipsoidModel = Content.Load<Model>("Models\\basketball"); | ||
|
||
// Fix missing logo texture by coloring the patch orange | ||
BasicEffect e = (BasicEffect)ellipsoidModel.Meshes[1].Effects[2]; | ||
e.DiffuseColor = new Vector3(0.827847719192505f, 0.432608515024185f, 0.20047302544117f); | ||
e.SpecularColor = new Vector3(0.2f, 0.2f, 0.2f); | ||
e.SpecularPower = 64.0f; | ||
//bbalTex = Content.Load<Texture2D>("Textures\\spalding"); | ||
//e.Texture = bbalTex; | ||
//e.TextureEnabled = true; | ||
} | ||
|
||
public override Vector3 Scale | ||
{ | ||
set { this._scale = 0.04f * value; } | ||
get { return this._scale; } | ||
} | ||
|
||
public override void Draw() | ||
{ | ||
// Copy any parent transforms. | ||
Matrix[] transforms = new Matrix[ellipsoidModel.Bones.Count]; | ||
ellipsoidModel.CopyAbsoluteBoneTransformsTo(transforms); | ||
|
||
|
||
// Draw the model. A model can have multiple meshes, so loop. | ||
//foreach (ModelMesh mesh in ellipsoidModel.Meshes) | ||
ModelMesh mesh = ellipsoidModel.Meshes[1]; | ||
{ | ||
// This is where the mesh orientation is set, as well as our camera and projection. | ||
foreach (BasicEffect effect in mesh.Effects) | ||
//BasicEffect effect = (BasicEffect)mesh.Effects[3]; | ||
{ | ||
effect.EnableDefaultLighting(); | ||
effect.PreferPerPixelLighting = true; | ||
//effect.TextureEnabled = true; | ||
//effect.Texture = bbalTex; | ||
//effect.TextureEnabled = true; | ||
//effect.DiffuseColor = this.color; | ||
//effect.AmbientLightColor = this.ambient; | ||
effect.LightingEnabled = true; | ||
//effect.DirectionalLight0.Direction = new Vector3(0.0f, 0.0f, 1.0f); | ||
|
||
effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up); | ||
effect.Projection = Matrix.CreatePerspective(0.2f, 0.2f, 1.0f, 1000.0f); | ||
effect.World = transforms[mesh.ParentBone.Index] | ||
//* Matrix.CreateRotationX(MathHelper.ToRadians(189.0f)) | ||
* Matrix.CreateScale(Scale.X/aspectRatio, Scale.Y, Scale.Z) | ||
* Matrix.CreateTranslation(Position) | ||
; | ||
} | ||
// Draw the mesh, using the effects set above. | ||
mesh.Draw(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> | ||
<PropertyGroup> | ||
<ProjectGuid>{7536376D-BAEC-4BD1-B221-29613EDBB7CE}</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>v3.5</TargetFrameworkVersion> | ||
<XnaFrameworkVersion>v3.0</XnaFrameworkVersion> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<OutputPath>..\bin\$(Configuration)</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
<XnaPlatform>Windows</XnaPlatform> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<XnaPlatform>Windows</XnaPlatform> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Fonts\GameFont.spritefont"> | ||
<Name>GameFont</Name> | ||
<Importer>FontDescriptionImporter</Importer> | ||
<Processor>FontDescriptionProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Models\sphere.x"> | ||
<Name>sphere</Name> | ||
<Importer>XImporter</Importer> | ||
<Processor>ModelProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Textures\text_background.bmp"> | ||
<Name>text_background</Name> | ||
<Importer>TextureImporter</Importer> | ||
<Processor>TextureProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Models\cube.x"> | ||
<Name>cube</Name> | ||
<Importer>XImporter</Importer> | ||
<Processor>ModelProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Models\hoop.x"> | ||
<Name>hoop</Name> | ||
<Importer>XImporter</Importer> | ||
<Processor>ModelProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Models\basketball.fbx"> | ||
<Name>basketball</Name> | ||
<Importer>FbxImporter</Importer> | ||
<Processor>ModelProcessor</Processor> | ||
</Compile> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\v3.0\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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file contains an xml description of a font, and will be read by the XNA | ||
Framework Content Pipeline. Follow the comments to customize the appearance | ||
of the font in your game, and to change the characters which are available to draw | ||
with. | ||
--> | ||
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics"> | ||
<Asset Type="Graphics:FontDescription"> | ||
|
||
<!-- | ||
Modify this string to change the font that will be imported. Redistributable sample | ||
fonts are available at http://go.microsoft.com/fwlink/?LinkId=104778&clcid=0x409. | ||
--> | ||
<FontName>Verdana</FontName> | ||
|
||
<!-- | ||
Size is a float value, measured in points. Modify this value to change | ||
the size of the font. | ||
--> | ||
<Size>14</Size> | ||
|
||
<!-- | ||
Spacing is a float value, measured in pixels. Modify this value to change | ||
the amount of spacing in between characters. | ||
--> | ||
<Spacing>0</Spacing> | ||
|
||
<!-- | ||
UseKerning controls the layout of the font. If this value is true, kerning information | ||
will be used when placing characters. | ||
--> | ||
<UseKerning>true</UseKerning> | ||
|
||
<!-- | ||
Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic", | ||
and "Bold, Italic", and are case sensitive. | ||
--> | ||
<Style>Regular</Style> | ||
|
||
<!-- | ||
CharacterRegions control what letters are available in the font. Every | ||
character from Start to End will be built and made available for drawing. The | ||
default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin | ||
character set. The characters are ordered according to the Unicode standard. | ||
See the documentation for more information. | ||
--> | ||
<CharacterRegions> | ||
<CharacterRegion> | ||
<Start> </Start> | ||
<End>~</End> | ||
</CharacterRegion> | ||
</CharacterRegions> | ||
</Asset> | ||
</XnaContent> |
Binary file not shown.
Oops, something went wrong.