Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #161 from khbecker/monogame-sdl2
Browse files Browse the repository at this point in the history
"ASCII text" file format and line endings for Input and Input/Touch.
  • Loading branch information
flibitijibibo committed Mar 17, 2014
2 parents d394e80 + f01c58c commit 2b05953
Show file tree
Hide file tree
Showing 21 changed files with 2,231 additions and 2,231 deletions.
118 changes: 59 additions & 59 deletions MonoGame.Framework/Input/AccelerometerCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,62 @@
*/
#endregion

namespace Microsoft.Xna.Framework.Input
{
public struct AccelerometerCapabilities
{
public bool IsConnected
{
get
{
return true;
}
}
public bool HasXAxis
{
get
{
return true;
}
}
public bool HasYAxis
{
get
{
return true;
}
}
public bool HasZAxis
{
get
{
return true;
}
}
public float MaximumAcceleration
{
get
{
//TODO: What?
return 1.0f;
}
}
public float MinimumAcceleration
{
get
{
//TODO: What?
return 0.0f;
}
}
public float AccelerationResolution
{
get
{
//TODO: What?
return 1.0f;
}
}
}
}
namespace Microsoft.Xna.Framework.Input
{
public struct AccelerometerCapabilities
{
public bool IsConnected
{
get
{
return true;
}
}
public bool HasXAxis
{
get
{
return true;
}
}
public bool HasYAxis
{
get
{
return true;
}
}
public bool HasZAxis
{
get
{
return true;
}
}
public float MaximumAcceleration
{
get
{
//TODO: What?
return 1.0f;
}
}
public float MinimumAcceleration
{
get
{
//TODO: What?
return 0.0f;
}
}
public float AccelerationResolution
{
get
{
//TODO: What?
return 1.0f;
}
}
}
}

60 changes: 30 additions & 30 deletions MonoGame.Framework/Input/AccelerometerState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@

namespace Microsoft.Xna.Framework.Input
{
public struct AccelerometerState
{
private Vector3 _acceleration;

public Vector3 Acceleration
{
get
{
return _acceleration;
}
internal set
{
_acceleration = value;
}
}

/*
public Matrix GetRotation()
{
throw new NotImplementedException();
}
*/

public bool IsConnected
{
get
{
return true;
}
}
public struct AccelerometerState
{
private Vector3 _acceleration;

public Vector3 Acceleration
{
get
{
return _acceleration;
}
internal set
{
_acceleration = value;
}
}

/*
public Matrix GetRotation()
{
throw new NotImplementedException();
}
*/

public bool IsConnected
{
get
{
return true;
}
}
}
}
40 changes: 20 additions & 20 deletions MonoGame.Framework/Input/ButtonState.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
* Copyright 2009-2014 Ethan Lee and the MonoGame Team
*
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion

using System;

namespace Microsoft.Xna.Framework.Input
{
public enum ButtonState
{
Released = 0,
Pressed = 1,
}
}
#region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
* Copyright 2009-2014 Ethan Lee and the MonoGame Team
*
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion

using System;

namespace Microsoft.Xna.Framework.Input
{
public enum ButtonState
{
Released = 0,
Pressed = 1,
}
}

64 changes: 32 additions & 32 deletions MonoGame.Framework/Input/GamePadButtons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,38 +102,38 @@ internal GamePadButtons(params Buttons[] buttons)
{
foreach (Buttons b in buttons)
this.buttons |= b;
}

/// <summary>
/// Determines whether two specified instances of <see cref="GamePadButtons"/> are equal.
/// </summary>
/// <param name="left">The first object to compare.</param>
/// <param name="right">The second object to compare.</param>
/// <returns>true if <paramref name="left"/> and <paramref name="right"/> are equal; otherwise, false.</returns>
public static bool operator ==(GamePadButtons left, GamePadButtons right)
{
return left.buttons == right.buttons;
}

/// <summary>
/// Determines whether two specified instances of <see cref="GamePadButtons"/> are not equal.
/// </summary>
/// <param name="left">The first object to compare.</param>
/// <param name="right">The second object to compare.</param>
/// <returns>true if <paramref name="left"/> and <paramref name="right"/> are not equal; otherwise, false.</returns>
public static bool operator !=(GamePadButtons left, GamePadButtons right)
{
return !(left == right);
}

/// <summary>
/// Returns a value indicating whether this instance is equal to a specified object.
/// </summary>
/// <param name="obj">An object to compare to this instance.</param>
/// <returns>true if <paramref name="obj"/> is a <see cref="GamePadButtons"/> and has the same value as this instance; otherwise, false.</returns>
public override bool Equals(object obj)
{
return (obj is GamePadButtons) && (this == (GamePadButtons)obj);
}

/// <summary>
/// Determines whether two specified instances of <see cref="GamePadButtons"/> are equal.
/// </summary>
/// <param name="left">The first object to compare.</param>
/// <param name="right">The second object to compare.</param>
/// <returns>true if <paramref name="left"/> and <paramref name="right"/> are equal; otherwise, false.</returns>
public static bool operator ==(GamePadButtons left, GamePadButtons right)
{
return left.buttons == right.buttons;
}

/// <summary>
/// Determines whether two specified instances of <see cref="GamePadButtons"/> are not equal.
/// </summary>
/// <param name="left">The first object to compare.</param>
/// <param name="right">The second object to compare.</param>
/// <returns>true if <paramref name="left"/> and <paramref name="right"/> are not equal; otherwise, false.</returns>
public static bool operator !=(GamePadButtons left, GamePadButtons right)
{
return !(left == right);
}

/// <summary>
/// Returns a value indicating whether this instance is equal to a specified object.
/// </summary>
/// <param name="obj">An object to compare to this instance.</param>
/// <returns>true if <paramref name="obj"/> is a <see cref="GamePadButtons"/> and has the same value as this instance; otherwise, false.</returns>
public override bool Equals(object obj)
{
return (obj is GamePadButtons) && (this == (GamePadButtons)obj);
}

public override int GetHashCode ()
Expand Down
Loading

0 comments on commit 2b05953

Please sign in to comment.