mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
Update for Monogame 3.8.2.1105 (#931)
* Update MonoGame references to 3.8.2.1105 * Vector2.Rotate is not built into MonoGame * Update to net8 * Update version number * Update changelog * Deprecate Vector2.Rotate for MonoGame only * Deprecate it but don't error it so API doesn't break for others.
This commit is contained in:
committed by
GitHub
parent
40d260b454
commit
da81c353f6
@@ -10,6 +10,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Unreleased changes exist in the current `develop` branch but have not been pushed as either a stable or prerelease NuGet package.
|
> 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
|
||||||
- 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 `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)
|
- 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)
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<SolutionDirectory>$(MSBuildThisFileDirectory)</SolutionDirectory>
|
<SolutionDirectory>$(MSBuildThisFileDirectory)</SolutionDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MonoGameExtendedVersion>4.0.0</MonoGameExtendedVersion>
|
<MonoGameExtendedVersion>4.0.1</MonoGameExtendedVersion>
|
||||||
<IsPrerelease Condition="'$(IS_PRERELEASE)' != ''">-prerelease</IsPrerelease>
|
<IsPrerelease Condition="'$(IS_PRERELEASE)' != ''">-prerelease</IsPrerelease>
|
||||||
<BuildNumber Condition="'$(BUILD_NUMBER)' != ''">.$(BUILD_NUMBER)</BuildNumber>
|
<BuildNumber Condition="'$(BUILD_NUMBER)' != ''">.$(BUILD_NUMBER)</BuildNumber>
|
||||||
<Version>$(MonoGameExtendedVersion)$(IsPrerelease)$(BuildNumber)</Version>
|
<Version>$(MonoGameExtendedVersion)$(IsPrerelease)$(BuildNumber)</Version>
|
||||||
|
|||||||
@@ -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.
|
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
|
```sh
|
||||||
dotnet add package MonoGame.Extended --version 4.0.0
|
dotnet add package MonoGame.Extended --version 4.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using the Content Pipeline Extensions
|
### Using the Content Pipeline Extensions
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
||||||
Version="3.8.1.303"
|
Version="3.8.2.1105"
|
||||||
PrivateAssets="All" />
|
PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<PackageReference Include="nkast.Xna.Framework.Game"
|
<PackageReference Include="nkast.Xna.Framework.Game"
|
||||||
Version="3.12.9001" />
|
Version="3.12.9001" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BenchmarkDotNet"
|
<PackageReference Include="BenchmarkDotNet"
|
||||||
Version="0.13.12" />
|
Version="0.13.12" />
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
||||||
Version="3.8.1.303"
|
Version="3.8.2.1105"
|
||||||
PrivateAssets="All" />
|
PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<PackageReference Include="Autofac" Version="5.2.0" />
|
<PackageReference Include="Autofac" Version="5.2.0" />
|
||||||
|
|
||||||
<PackageReference Include="MonoGame.Framework.Content.Pipeline"
|
<PackageReference Include="MonoGame.Framework.Content.Pipeline"
|
||||||
Version="3.8.1.303"
|
Version="3.8.2.1105"
|
||||||
PrivateAssets="All" />
|
PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
"isRoot": true,
|
"isRoot": true,
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet-mgfxc": {
|
"dotnet-mgfxc": {
|
||||||
"version": "3.8.1.303",
|
"version": "3.8.2.1105",
|
||||||
"commands": [
|
"commands": [
|
||||||
"mgfxc"
|
"mgfxc"
|
||||||
],
|
],
|
||||||
"rollForward": false
|
"rollForward": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ namespace MonoGame.Extended
|
|||||||
return Math.Abs(value.X - otherValue.X) <= tolerance && (Math.Abs(value.Y - otherValue.Y) <= tolerance);
|
return Math.Abs(value.X - otherValue.X) <= tolerance && (Math.Abs(value.Y - otherValue.Y) <= tolerance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FNA || KNI
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[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)
|
public static Vector2 Rotate(this Vector2 value, float radians)
|
||||||
{
|
{
|
||||||
var cos = (float) Math.Cos(radians);
|
var cos = (float) Math.Cos(radians);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
<ItemGroup Condition="!$(DefineConstants.Contains('FNA')) AND !$(DefineConstants.Contains('KNI'))">
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
<PackageReference Include="MonoGame.Framework.DesktopGL"
|
||||||
Version="3.8.1.303" />
|
Version="3.8.2.1105" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(DefineConstants.Contains('KNI'))">
|
<ItemGroup Condition="$(DefineConstants.Contains('KNI'))">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<PackageReference Include="MonoGame.Framework.DesktopGL.9000"
|
<PackageReference Include="MonoGame.Framework.DesktopGL.9000"
|
||||||
Version="3.12.9001" />
|
Version="3.12.9001" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(DefineConstants.Contains('FNA'))">
|
<ItemGroup Condition="$(DefineConstants.Contains('FNA'))">
|
||||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\FNA\FNA.NetStandard.csproj" />
|
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\FNA\FNA.NetStandard.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
+3
-3
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<ItemGroup>
|
<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>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\source\MonoGame.Extended.Content.Pipeline\MonoGame.Extended.Content.Pipeline.csproj" />
|
<ProjectReference Include="..\..\source\MonoGame.Extended.Content.Pipeline\MonoGame.Extended.Content.Pipeline.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="TestData\astrid-animator-atlas.json" CopyToOutputDirectory="PreserveNewest" />
|
<Content Include="TestData\astrid-animator-atlas.json" CopyToOutputDirectory="PreserveNewest" />
|
||||||
<Content Include="TestData\astrid-animator.aa" CopyToOutputDirectory="PreserveNewest" />
|
<Content Include="TestData\astrid-animator.aa" CopyToOutputDirectory="PreserveNewest" />
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace MonoGame.Extended.Tests
|
|||||||
Assert.Equal(new Vector2(10, 5), c);
|
Assert.Equal(new Vector2(10, 5), c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FNA || KNI
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Vector2_Rotate_90_Degrees_Test()
|
public void Vector2_Rotate_90_Degrees_Test()
|
||||||
{
|
{
|
||||||
@@ -63,6 +64,7 @@ namespace MonoGame.Extended.Tests
|
|||||||
Assert.True(new Vector2(7.071068f, -7.071068f).EqualsWithTolerence(b));
|
Assert.True(new Vector2(7.071068f, -7.071068f).EqualsWithTolerence(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Vector2_Truncate_Test()
|
public void Vector2_Truncate_Test()
|
||||||
{
|
{
|
||||||
@@ -91,7 +93,12 @@ namespace MonoGame.Extended.Tests
|
|||||||
{
|
{
|
||||||
var a = new Vector2(0, -10);
|
var a = new Vector2(0, -10);
|
||||||
var b = new Vector2(10, 0);
|
var b = new Vector2(10, 0);
|
||||||
|
#if FNA || KNI
|
||||||
var c = -Vector2.UnitY.Rotate(MathHelper.ToRadians(45));
|
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(0), a.ToAngle());
|
||||||
Assert.Equal(MathHelper.ToRadians(90), b.ToAngle());
|
Assert.Equal(MathHelper.ToRadians(90), b.ToAngle());
|
||||||
|
|||||||
Reference in New Issue
Block a user