Skip to content

Commit

Permalink
Use AsepriteDotNet for all parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AristurtleDev committed Mar 26, 2024
1 parent 834c781 commit 3139277
Show file tree
Hide file tree
Showing 77 changed files with 4,848 additions and 9,775 deletions.
12 changes: 0 additions & 12 deletions MonoGame.Aseprite.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Aseprite", "source
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Aseprite.Content.Pipeline", "source\MonoGame.Aseprite.Content.Pipeline\MonoGame.Aseprite.Content.Pipeline.csproj", "{49903681-88CC-4B14-AD02-C475E78D4CE2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FFCB306E-00AB-4CCF-A88A-4FE52D1E9778}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Aseprite.Tests", "tests\MonoGame.Aseprite.Tests\MonoGame.Aseprite.Tests.csproj", "{133DE9C3-4D1A-4FF1-8994-1174424B2223}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{78ECB0CA-72B0-4E08-BAB1-8BF2B98829D9}"
ProjectSection(SolutionItems) = preProject
build\Directory.Build.props = build\Directory.Build.props
Expand Down Expand Up @@ -49,10 +42,6 @@ Global
{49903681-88CC-4B14-AD02-C475E78D4CE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49903681-88CC-4B14-AD02-C475E78D4CE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49903681-88CC-4B14-AD02-C475E78D4CE2}.Release|Any CPU.Build.0 = Release|Any CPU
{133DE9C3-4D1A-4FF1-8994-1174424B2223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{133DE9C3-4D1A-4FF1-8994-1174424B2223}.Debug|Any CPU.Build.0 = Debug|Any CPU
{133DE9C3-4D1A-4FF1-8994-1174424B2223}.Release|Any CPU.ActiveCfg = Release|Any CPU
{133DE9C3-4D1A-4FF1-8994-1174424B2223}.Release|Any CPU.Build.0 = Release|Any CPU
{4E3BCA48-A076-4ECE-A80A-F254DAE2D18E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E3BCA48-A076-4ECE-A80A-F254DAE2D18E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E3BCA48-A076-4ECE-A80A-F254DAE2D18E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -64,7 +53,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{B5D9570E-E9BF-482B-BD73-8EA6EC4330F8} = {CF520A36-B1B8-4CFA-9835-C3345A65D57B}
{49903681-88CC-4B14-AD02-C475E78D4CE2} = {CF520A36-B1B8-4CFA-9835-C3345A65D57B}
{133DE9C3-4D1A-4FF1-8994-1174424B2223} = {FFCB306E-00AB-4CCF-A88A-4FE52D1E9778}
{4E3BCA48-A076-4ECE-A80A-F254DAE2D18E} = {78ECB0CA-72B0-4E08-BAB1-8BF2B98829D9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

namespace MonoGame.Aseprite.Content.Pipeline;

internal record AsepriteFileImportResult(byte[] Data, AsepriteFile AsepriteFile);
internal record AsepriteFileImportResult(string FilePath);
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------------------------- */

namespace MonoGame.Aseprite.Tests;
namespace MonoGame.Aseprite.Content.Pipeline;

internal static class FileUtils
{
internal static string GetLocalPath(string fileName)
{
return Path.Combine(Environment.CurrentDirectory, "Files", fileName);
}
}
internal record AsepriteFileProcessResult(string Name, byte[] Data);

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ internal class AsepriteFileContentImporter : ContentImporter<AsepriteFileImportR
{
public override AsepriteFileImportResult Import(string path, ContentImporterContext context)
{
byte[] data = File.ReadAllBytes(path);
AsepriteFile aseFile;

try
{
aseFile = AsepriteFile.Load(path);
}
catch (InvalidOperationException ex)
{
throw new ContentImportException(ex.Message, path);
}

return new(data, aseFile);
return new AsepriteFileImportResult(path);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,10 @@

<!-- NuGet Package References -->
<ItemGroup>
<PackageReference Include="MonoGame.Framework.Content.Pipeline"
Version="3.8.1.303"
PrivateAssets="All" />
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.1.303" PrivateAssets="All" />

<PackageReference Include="MonoGame.Framework.DesktopGL"
Version="3.8.1.303"
PrivateAssets="All" />
</ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" PrivateAssets="All" />

<!-- Compile include code files from shared directory -->
<ItemGroup>
<Compile Include="../MonoGame.Aseprite.Shared/**/*.cs" />
<PackageReference Include="AsepriteDotNet" Version="1.2.1.21" />
</ItemGroup>
</Project>

This file was deleted.

Loading

0 comments on commit 3139277

Please sign in to comment.