Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Monogame 3.8.2.1105 #931

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> [!NOTE]
> Unreleased changes exist in the current `develop` branch but have not been pushed as either a stable or prerelease NuGet package.
>

## [4.0.1]
- `VortexModifier` now properly makes use of the `MaxSpeed` property. [@AristurtleDev](https://github.com/AristurtleDev) [#921](https://github.com/craftworkgames/MonoGame.Extended/pull/921)
- `rayNearDistance` and `rayFarDistance` are now properly swapped in `PrimitivesHelper.IntersectsSlab()`. [@AristurtleDev](https://github.com/AristurtleDev) [#922](https://github.com/craftworkgames/MonoGame.Extended/pull/922)
- Resolved issue where an `ArgumentNullException` was thrown when loading BitmapFonts due to the `bmfFile.Path` value not being set. [@AristurtleDev](https://github.com/AristurtleDev) [#924](https://github.com/craftworkgames/MonoGame.Extended/pull/924)
- Resolved issue for FNA in `ColorExtensions.FromArgb` due to FNA `Color` struct not having a constructor that accepts a uint packed value. [@ValorZard](https://github.com/ValorZard) [#925](https://github.com/craftworkgames/MonoGame.Extended/pull/925)
- Updated for MonOGame 3.8.2.1105 release [@AristurtleDev](https://github.com/AristurtleDev) [#926](https://github.com/craftworkgames/MonoGame.Extended/pull/926)
- MonoGame References updated to 3.8.2.1105
- MonoGame.Extended target framework updated to net8.0
- `Vector2Extensions.Rotate` has been marked deprecated for MonoGame targets only (KNI and FNA still use this). With the release of MonoGame 3.8.2.1105, MonoGame now has a built in method for rotating a `Vector2`. [@AristurtleDev](https://github.com/AristurtleDev) [#926](https://github.com/craftworkgames/MonoGame.Extended/pull/926)
-

## [4.0.0]
### Added
- Added unit test for `PolyGon.Contains` to ensure consistency in expected return values for edge touching compared to MonoGame. [@AristurtleDev](https://github.com/AristurtleDev) [#871](https://github.com/craftworkgames/MonoGame.Extended/pull/871)
- Added unit test for `BitmapFont.MeasureString` to validate that it correctly accounts for trailing whitespace. [@AristurtleDev](https://github.com/AristurtleDev) [#876](https://github.com/craftworkgames/MonoGame.Extended/pull/876)
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<SolutionDirectory>$(MSBuildThisFileDirectory)</SolutionDirectory>
</PropertyGroup>

<PropertyGroup>
<MonoGameExtendedVersion>4.0.0</MonoGameExtendedVersion>
<MonoGameExtendedVersion>4.0.1</MonoGameExtendedVersion>
<IsPrerelease Condition="'$(IS_PRERELEASE)' != ''">-prerelease</IsPrerelease>
<BuildNumber Condition="'$(BUILD_NUMBER)' != ''">.$(BUILD_NUMBER)</BuildNumber>
<Version>$(MonoGameExtendedVersion)$(IsPrerelease)$(BuildNumber)</Version>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MonoGame.Extended is a set of utilities (in the form of libraries/tools) to [Mon
Code is distributed as NuGet packages in the form of libraries (`.dll` files). You can easily install the NuGet packages into your existing MonoGame project using the NuGet Package Manager UI in Visual Studio or by using the command line interface (CLI) in a terminal.

```sh
dotnet add package MonoGame.Extended --version 4.0.0
dotnet add package MonoGame.Extended --version 4.0.1
```

### Using the Content Pipeline Extensions
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
<PackageReference Include="MonoGame.Framework.DesktopGL"
Version="3.8.1.303"
Version="3.8.2.1105"
PrivateAssets="All" />
</ItemGroup>

Expand All @@ -34,7 +34,7 @@
<PackageReference Include="nkast.Xna.Framework.Game"
Version="3.12.9001" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet"
Version="0.13.12" />
Expand Down
2 changes: 1 addition & 1 deletion source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
<PackageReference Include="MonoGame.Framework.DesktopGL"
Version="3.8.1.303"
Version="3.8.2.1105"
PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Autofac" Version="5.2.0" />

<PackageReference Include="MonoGame.Framework.Content.Pipeline"
Version="3.8.1.303"
Version="3.8.2.1105"
PrivateAssets="All" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions source/MonoGame.Extended/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"isRoot": true,
"tools": {
"dotnet-mgfxc": {
"version": "3.8.1.303",
"version": "3.8.2.1105",
"commands": [
"mgfxc"
],
"rollForward": false
}
}
}
}
4 changes: 4 additions & 0 deletions source/MonoGame.Extended/Math/Vector2Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ public static bool EqualsWithTolerence(this Vector2 value, Vector2 otherValue, f
return Math.Abs(value.X - otherValue.X) <= tolerance && (Math.Abs(value.Y - otherValue.Y) <= tolerance);
}

#if FNA || KNI
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#else
[Obsolete("Use native Vector2.Rotate provided by MonoGame instead. This will be removed in a future release.", false)]
#endif
public static Vector2 Rotate(this Vector2 value, float radians)
{
var cos = (float) Math.Cos(radians);
Expand Down
4 changes: 2 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
<PackageReference Include="MonoGame.Framework.DesktopGL"
Version="3.8.1.303" />
Version="3.8.2.1105" />
</ItemGroup>

<ItemGroup Condition="$(DefineConstants.Contains('KNI'))">
Expand All @@ -30,7 +30,7 @@
<PackageReference Include="MonoGame.Framework.DesktopGL.9000"
Version="3.12.9001" />
</ItemGroup>

<ItemGroup Condition="$(DefineConstants.Contains('FNA'))">
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\FNA\FNA.NetStandard.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.2.1105" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\source\MonoGame.Extended.Content.Pipeline\MonoGame.Extended.Content.Pipeline.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="TestData\astrid-animator-atlas.json" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\astrid-animator.aa" CopyToOutputDirectory="PreserveNewest" />
Expand Down
7 changes: 7 additions & 0 deletions tests/MonoGame.Extended.Tests/Vector2ExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void Vector2_Perpendicular_Test()
Assert.Equal(new Vector2(10, 5), c);
}

#if FNA || KNI
[Fact]
public void Vector2_Rotate_90_Degrees_Test()
{
Expand Down Expand Up @@ -63,6 +64,7 @@ public void Vector2_Rotate_45_Degrees_Test()
Assert.True(new Vector2(7.071068f, -7.071068f).EqualsWithTolerence(b));
}

#endif
[Fact]
public void Vector2_Truncate_Test()
{
Expand Down Expand Up @@ -91,7 +93,12 @@ public void Vector2_ToAngle_Test()
{
var a = new Vector2(0, -10);
var b = new Vector2(10, 0);
#if FNA || KNI
var c = -Vector2.UnitY.Rotate(MathHelper.ToRadians(45));
#else
var c = -Vector2.UnitY;
c.Rotate(MathHelper.ToRadians(45));
#endif

Assert.Equal(MathHelper.ToRadians(0), a.ToAngle());
Assert.Equal(MathHelper.ToRadians(90), b.ToAngle());
Expand Down
Loading