Skip to content

Commit

Permalink
Fixes #135. Restored GoRogue's capability to function in non-MonoGame…
Browse files Browse the repository at this point in the history
… projects. Updated dependencies of performance tests. Updated csproj for 2.1.1 release.
  • Loading branch information
Chris3606 committed Mar 31, 2019
1 parent 54cbf0a commit 55e9bd8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 65 deletions.
4 changes: 2 additions & 2 deletions GoRogue-PerformanceTests/GoRogue-PerformanceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<Reference Include="EasyConsole, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EasyConsole.1.1.0\lib\net452\EasyConsole.dll</HintPath>
</Reference>
<Reference Include="Priority Queue, Version=4.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OptimizedPriorityQueue.4.1.1\lib\net45\Priority Queue.dll</HintPath>
<Reference Include="Priority Queue, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OptimizedPriorityQueue.4.2.0\lib\net45\Priority Queue.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion GoRogue-PerformanceTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EasyConsole" version="1.1.0" targetFramework="net462" />
<package id="OptimizedPriorityQueue" version="4.1.1" targetFramework="net462" />
<package id="OptimizedPriorityQueue" version="4.2.0" targetFramework="net462" />
<package id="Troschuetz.Random" version="4.3.0" targetFramework="net462" />
</packages>
38 changes: 1 addition & 37 deletions GoRogue/Coord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ namespace GoRogue
/// Coord where possible, as something that accepts or works with Coord will generally work with other supported types
/// as well.
/// </remarks>
public struct Coord : IEquatable<Coord>, IEquatable<MonoPoint>, IEquatable<DrawingPoint>, IEquatable<PointF>, IEquatable<Size>, IEquatable<SizeF>,
IEquatable<(int x, int y)>
public struct Coord : IEquatable<Coord>, IEquatable<(int x, int y)>
{
/// <summary>
/// Coord value that represents None or no position (since Coord is not a nullable type).
Expand Down Expand Up @@ -485,13 +484,6 @@ public override int GetHashCode()
/// True if either the x-values or y-values are not equal, false if they are both equal.
/// </returns>
public static bool operator !=(MonoPoint p1, Coord c2) => !(p1 == c2);

/// <summary>
/// True if the given coordinate has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two coordinates are equal, false if not.</returns>
public bool Equals(MonoPoint other) => X == other.X && Y == other.Y;
#endregion

#region System.Drawing Compatibility
Expand Down Expand Up @@ -662,13 +654,6 @@ public override int GetHashCode()
/// </returns>
public static bool operator !=(DrawingPoint p1, Coord c2) => !(p1 == c2);

/// <summary>
/// True if the given coordinate has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two coordinates are equal, false if not.</returns>
public bool Equals(DrawingPoint other) => X == other.X && Y == other.Y;

/// <summary>
/// True if the two point's X and Y values are equal.
/// </summary>
Expand Down Expand Up @@ -711,13 +696,6 @@ public override int GetHashCode()
/// </returns>
public static bool operator !=(PointF p1, Coord c2) => !(p1 == c2);

/// <summary>
/// True if the given coordinate has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two coordinates are equal, false if not.</returns>
public bool Equals(PointF other) => X == other.X && Y == other.Y;

/// <summary>
/// True if the point's x/y values equal the size's width/height values.
/// </summary>
Expand Down Expand Up @@ -760,13 +738,6 @@ public override int GetHashCode()
/// </returns>
public static bool operator !=(Size size, Coord c) => !(size == c);

/// <summary>
/// True if the current coordinate has equal x and y values to the given size's Width/Height values.
/// </summary>
/// <param name="other">Size to compare.</param>
/// <returns>True if the size and coordinate are equivalent, false if not.</returns>
public bool Equals(Size other) => X == other.Width && Y == other.Height;

/// <summary>
/// True if the point's x/y values equal the size's width/height values.
/// </summary>
Expand Down Expand Up @@ -808,13 +779,6 @@ public override int GetHashCode()
/// True if either the Width/x values or the Height/y values are not equal, false if they are both equal.
/// </returns>
public static bool operator !=(SizeF size, Coord c) => !(size == c);

/// <summary>
/// True if the current coordinate has equal x and y values to the given size's Width/Height values.
/// </summary>
/// <param name="other">SizeF to compare.</param>
/// <returns>True if the size and coordinate are equivalent, false if not.</returns>
public bool Equals(SizeF other) => X == other.Width && Y == other.Height;
#endregion

#region TupleCompatibility
Expand Down
4 changes: 2 additions & 2 deletions GoRogue/GoRogue.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>GoRogue</PackageId>
<PackageVersion>2.1.0</PackageVersion>
<PackageVersion>2.1.1</PackageVersion>
<Authors>Christopher Ridley</Authors>
<Description>Roguelike/2D game utility library.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Chris3606/GoRogue</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>See https://github.com/Chris3606/GoRogue/releases/tag/2.1.0 for details.</PackageReleaseNotes>
<PackageReleaseNotes>HOTFIX: See https://github.com/Chris3606/GoRogue/releases/tag/2.1.1 for details.</PackageReleaseNotes>
<Copyright>Copyright 2019 Christopher Ridley. All rights reserved.</Copyright>
<PackageTags>roguelike roguelikes rogue library 2d game games</PackageTags>
<!-- Add symbols package -->
Expand Down
24 changes: 1 addition & 23 deletions GoRogue/Rectangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ namespace GoRogue
/// Rectangle where possible, as something that accepts or works with Rectangle will generally work with other supported types
/// as well.
/// </remarks>
public struct Rectangle : IEquatable<Rectangle>, IEquatable<XnaRectangle>, IEquatable<DrawingRectangle>, IEquatable<DrawingRectangleF>,
IEquatable<(int x, int y, int width, int height)>
public struct Rectangle : IEquatable<Rectangle>, IEquatable<(int x, int y, int width, int height)>
{
/// <summary>
/// The empty rectangle. Has origin of (0, 0) with 0 width and height.
Expand Down Expand Up @@ -826,13 +825,6 @@ public Rectangle TranslateY(int dy)
/// True if any of the x/y/width/height values are not equal, false if they are all equal.
/// </returns>
public static bool operator !=(XnaRectangle r1, Rectangle r2) => !(r1 == r2);

/// <summary>
/// True if the given position has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two positions are equal, false if not.</returns>
public bool Equals(XnaRectangle other) => X == other.X && Y == other.Y && Width == other.Width && Height == other.Height;
#endregion

#region System Drawing Conversions
Expand Down Expand Up @@ -898,13 +890,6 @@ public Rectangle TranslateY(int dy)
/// </returns>
public static bool operator !=(DrawingRectangle r1, Rectangle r2) => !(r1 == r2);

/// <summary>
/// True if the given position has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two positions are equal, false if not.</returns>
public bool Equals(DrawingRectangle other) => X == other.X && Y == other.Y && Width == other.Width && Height == other.Height;

/// <summary>
/// True if the two rectangles represent the same area.
/// </summary>
Expand Down Expand Up @@ -946,13 +931,6 @@ public Rectangle TranslateY(int dy)
/// True if any of the x/y/width/height values are not equal, false if they are all equal.
/// </returns>
public static bool operator !=(DrawingRectangleF r1, Rectangle r2) => !(r1 == r2);

/// <summary>
/// True if the given position has equal x and y values to the current one.
/// </summary>
/// <param name="other">Point to compare.</param>
/// <returns>True if the two positions are equal, false if not.</returns>
public bool Equals(DrawingRectangleF other) => X == other.X && Y == other.Y && Width == other.Width && Height == other.Height;
#endregion

#region Tuple Compability
Expand Down

0 comments on commit 55e9bd8

Please sign in to comment.