From c287d7c03f422b7549b057e5926989acf254f49e Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 5 Apr 2024 00:30:44 +0200 Subject: [PATCH] Move Animation Serializer/Deserializer to Serializer/Deserializer folder --- PCK-Studio/Forms/Editor/AnimationEditor.cs | 3 +-- PCK-Studio/Forms/Editor/TextureAtlasEditor.cs | 2 ++ .../Internal/{ => Deserializer}/AnimationDeserializer.cs | 2 +- PCK-Studio/Internal/{ => Serializer}/AnimationSerializer.cs | 4 ++-- PCK-Studio/MainForm.cs | 3 +++ PCK-Studio/PckStudio.csproj | 3 ++- 6 files changed, 11 insertions(+), 6 deletions(-) rename PCK-Studio/Internal/{ => Deserializer}/AnimationDeserializer.cs (98%) rename PCK-Studio/Internal/{ => Serializer}/AnimationSerializer.cs (90%) diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.cs b/PCK-Studio/Forms/Editor/AnimationEditor.cs index b76a1a1d..6df69bf8 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.cs @@ -32,9 +32,8 @@ using PckStudio.Forms.Additional_Popups.Animation; using PckStudio.Extensions; using PckStudio.Properties; using PckStudio.Internal; -using PckStudio.Internal.Json; -using PckStudio.Helper; using AnimatedGif; +using PckStudio.Internal.Deserializer; namespace PckStudio.Forms.Editor { diff --git a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs index 517297dd..b90b452c 100644 --- a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs +++ b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs @@ -32,7 +32,9 @@ using OMI.Workers.Color; using PckStudio.Extensions; using PckStudio.Helper; using PckStudio.Internal; +using PckStudio.Internal.Deserializer; using PckStudio.Internal.Json; +using PckStudio.Internal.Serializer; namespace PckStudio.Forms.Editor { diff --git a/PCK-Studio/Internal/AnimationDeserializer.cs b/PCK-Studio/Internal/Deserializer/AnimationDeserializer.cs similarity index 98% rename from PCK-Studio/Internal/AnimationDeserializer.cs rename to PCK-Studio/Internal/Deserializer/AnimationDeserializer.cs index 62eac630..04f23dc0 100644 --- a/PCK-Studio/Internal/AnimationDeserializer.cs +++ b/PCK-Studio/Internal/Deserializer/AnimationDeserializer.cs @@ -10,7 +10,7 @@ using OMI.Formats.Pck; using PckStudio.Extensions; using PckStudio.Interfaces; -namespace PckStudio.Internal +namespace PckStudio.Internal.Deserializer { internal sealed class AnimationDeserializer : IPckDeserializer { diff --git a/PCK-Studio/Internal/AnimationSerializer.cs b/PCK-Studio/Internal/Serializer/AnimationSerializer.cs similarity index 90% rename from PCK-Studio/Internal/AnimationSerializer.cs rename to PCK-Studio/Internal/Serializer/AnimationSerializer.cs index 426f4f00..61756723 100644 --- a/PCK-Studio/Internal/AnimationSerializer.cs +++ b/PCK-Studio/Internal/Serializer/AnimationSerializer.cs @@ -11,7 +11,7 @@ using OMI.Formats.Pck; using PckStudio.Extensions; using PckStudio.Interfaces; -namespace PckStudio.Internal +namespace PckStudio.Internal.Serializer { internal sealed class AnimationSerializer : IPckFileSerializer { @@ -22,7 +22,7 @@ namespace PckStudio.Internal string anim = animation.BuildAnim(); file.SetProperty("ANIM", anim); var texture = animation.BuildTexture(); - file.SetData(texture, ImageFormat.Png); + file.SetTexture(texture); } } } diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 53d7a5c3..7dc60190 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -34,6 +34,9 @@ using PckStudio.Classes.Utils; using PckStudio.Helper; using System.Text.RegularExpressions; using PckStudio.Internal.Json; +using PckStudio.Internal.Deserializer; +using PckStudio.Internal.Serializer; +using OMI.Workers; namespace PckStudio { diff --git a/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index ff19b0a0..55d947f2 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -139,7 +139,8 @@ - + +