Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Cleaned up shape classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed May 22, 2020
1 parent 332b66f commit b1d8e78
Show file tree
Hide file tree
Showing 11 changed files with 1,489 additions and 1,489 deletions.
18 changes: 9 additions & 9 deletions MonoGame/MonoGame.Framework/Graphics/GraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ public partial class GraphicsDevice : IDisposable
private Color _blendFactor = Color.White;
private bool _blendFactorDirty;

private BlendState _blendState;
private BlendState _actualBlendState;
private bool _blendStateDirty;
// private BlendState _blendState;
// private BlendState _actualBlendState;
// private bool _blendStateDirty;

private BlendState _blendStateAdditive;
private BlendState _blendStateAlphaBlend;
private BlendState _blendStateNonPremultiplied;
private BlendState _blendStateOpaque;
// private BlendState _blendStateAdditive;
// private BlendState _blendStateAlphaBlend;
// private BlendState _blendStateNonPremultiplied;
// private BlendState _blendStateOpaque;

// private DepthStencilState _depthStencilState;
// private DepthStencilState _actualDepthStencilState;
Expand Down Expand Up @@ -600,8 +600,8 @@ protected virtual void Dispose(bool disposing)
// Clear the effect cache.
EffectCache.Clear();

_blendState = null;
_actualBlendState = null;
// _blendState = null;
// _actualBlendState = null;
// _blendStateAdditive.Dispose();
// _blendStateAlphaBlend.Dispose();
// _blendStateNonPremultiplied.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions MonoGame/MonoGame.Framework/Graphics/SpriteBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SpriteBatch : GraphicsResource
readonly SpriteBatcher _batcher;

SpriteSortMode _sortMode;
BlendState _blendState;
// BlendState _blendState;
SamplerState _samplerState;
// DepthStencilState _depthStencilState;
// RasterizerState _rasterizerState;
Expand Down Expand Up @@ -79,7 +79,7 @@ public SpriteBatch (GraphicsDevice graphicsDevice, int capacity)
public void Begin
(
SpriteSortMode sortMode = SpriteSortMode.Deferred,
BlendState blendState = null,
// BlendState blendState = null,
SamplerState samplerState = null,
/*DepthStencilState depthStencilState = null,*/
// RasterizerState rasterizerState = null,
Expand Down
10 changes: 5 additions & 5 deletions MonoGame/MonoGame.Framework/MathHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public static class MathHelper
/// <summary>
/// Represents the log base ten of e(0.4342945).
/// </summary>
public const float Log10E = 0.4342945f;
// public const float Log10E = 0.4342945f;

/// <summary>
/// Represents the log base two of e(1.442695).
/// </summary>
public const float Log2E = 1.442695f;
// public const float Log2E = 1.442695f;

/// <summary>
/// Represents the value of pi(3.14159274).
Expand All @@ -34,12 +34,12 @@ public static class MathHelper
/// <summary>
/// Represents the value of pi divided by two(1.57079637).
/// </summary>
public const float PiOver2 = (float)(Math.PI / 2.0);
// public const float PiOver2 = (float)(Math.PI / 2.0);

/// <summary>
/// Represents the value of pi divided by four(0.7853982).
/// </summary>
public const float PiOver4 = (float)(Math.PI / 4.0);
// public const float PiOver4 = (float)(Math.PI / 4.0);

/// <summary>
/// Represents the value of pi times two(6.28318548).
Expand All @@ -50,7 +50,7 @@ public static class MathHelper
/// Represents the value of pi times two(6.28318548).
/// This is an alias of TwoPi.
/// </summary>
public const float Tau = TwoPi;
// public const float Tau = TwoPi;

/// <summary>
/// Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.
Expand Down
30 changes: 15 additions & 15 deletions MonoGame/MonoGame.Framework/Point.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ public Point(int x, int y)
/// Constructs a point with X and Y set to the same value.
/// </summary>
/// <param name="value">The x and y coordinates in 2d-space.</param>
public Point(int value)
{
this.X = value;
this.Y = value;
}
// public Point(int value)
// {
// this.X = value;
// this.Y = value;
// }

#endregion

Expand Down Expand Up @@ -212,22 +212,22 @@ public override string ToString()
/// Gets a <see cref="Vector2"/> representation for this object.
/// </summary>
/// <returns>A <see cref="Vector2"/> representation for this object.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Vector2 ToVector2()
{
return new Vector2(X, Y);
}
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
// public Vector2 ToVector2()
// {
// return new Vector2(X, Y);
// }

/// <summary>
/// Deconstruction method for <see cref="Point"/>.
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
public void Deconstruct(out int x, out int y)
{
x = X;
y = Y;
}
// public void Deconstruct(out int x, out int y)
// {
// x = X;
// y = Y;
// }

#endregion
}
Expand Down

0 comments on commit b1d8e78

Please sign in to comment.