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

Add compatibility with FNA #106

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
31 changes: 31 additions & 0 deletions source/MonoGame.Aseprite/MonoGame.Aseprite.FNA.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Project level compilation properties -->
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<!-- Project level package properties -->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since FNA isn't distributed via NuGet and this csproj wouldn't be included in the package building done by the cake script, this entire PropertyGroup can be removed.

<PropertyGroup>
<PackageId>MonoGame.Aseprite.FNA</PackageId>
<Description>
MonoGame.Aseprite is a cross-platform C# library that adds support to MonoGame projects for
Aseprite (.asepirte/.ase) files.
</Description>
</PropertyGroup>

<!-- Includes for NuGets -->
<ItemGroup>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, this Item group can be removed since this csproj wouldn't be packed for NuGet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the stuff in the next commit

<None Include="..\..\.images\\nuget-icon.png" Pack="true" PackagePath="" />
<None Include="..\..\README.md" Pack="true" PackagePath="" />
<None Include="$(OutDir)Monogame.Aseprite.xml" Pack="true" PackagePath="lib\net6.0" />
</ItemGroup>

<!-- Project References -->
<ItemGroup>
<ProjectReference Include="..\..\..\AsepriteDotNet\source\AsepriteDotNet\AsepriteDotNet.csproj" />
<ProjectReference Include="..\..\..\FNA\FNA.Core.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion source/MonoGame.Aseprite/TextureAtlas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public TextureRegion CreateRegion(string name, int x, int y, int width, int heig
/// </exception>
/// <returns>The <see cref="TextureRegion"/> created by this method.</returns>
public TextureRegion CreateRegion(string name, Point location, Point size) =>
CreateRegion(name, new Rectangle(location, size));
CreateRegion(name, new Rectangle(location.X, location.Y, size.X, size.Y));

/// <summary>
/// Creates a new <see cref="TextureRegion"/> and adds it to this <see cref="TextureAtlas"/>.
Expand Down